On 18/06/2023 14:07, Jiri Olsa wrote: > On Fri, Jun 16, 2023 at 06:17:24PM +0100, Alan Maguire wrote: >> Generate BTF kind layout information, crcs for kernel and module BTF >> if support is available in pahole. >> >> Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx> >> --- >> scripts/pahole-flags.sh | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh >> index 728d55190d97..cb304e0a4434 100755 >> --- a/scripts/pahole-flags.sh >> +++ b/scripts/pahole-flags.sh >> @@ -25,6 +25,13 @@ if [ "${pahole_ver}" -ge "124" ]; then >> fi >> if [ "${pahole_ver}" -ge "125" ]; then >> extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized" >> + pahole_help="$(${PAHOLE} --help)" > > nice ;-) > >> + if [[ "$pahole_help" =~ "btf_gen_kind_layout" ]]; then >> + extra_paholeopt="${extra_paholeopt} --btf_gen_kind_layout" >> + fi >> + if [[ "$pahole_help" =~ "btf_gen_crc" ]]; then >> + extra_paholeopt="${extra_paholeopt} --btf_gen_crc" >> + fi > > do we need to have an option to enable crc? could it be by default? > > it's sort of related to the layout changes and I wonder we will want > 'not to have it' if there's support for it in BTF > I'm reluctant to enable by default yet because without CRC and kind layout the new header format will work on older kernels too. With the kind layout len/offset 0 and CRCs 0, the header is just slightly larger than the original. I originally combined the two in the metadata section header, but I think as separate concepts it makes sense to have separate flags. Thanks! Alan > jirka > >> fi >> >> echo ${extra_paholeopt} >> -- >> 2.39.3 >>