Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pahole: Do --lang_exclude CU filtering earlier
With this, we can avoid warnings for unsupported DWARF tags like: die__process_function: tag not supported 0x2f (template_type_parameter)! when processing object files generated from languages such as Rust, for instance when building the Linux kernel with `CONFIG_RUST`, after applying the next patch in this series. As an added bonus, this should speed up processing of large objects with filtered CUs, as their details will no longer be walked. Committer testing: Tested building a kernel with CONFIG_RUST, no warnings (that template_type_param wouldn't appear anyway as I added initial support for it, at least for creating some structs out of its DWARF info, so no more warnings), but: ⬢[acme@toolbox linux]$ pahole -C '<kernel::str::RawFormatter as core::fmt::Write>::{vtable_type}' ../build/rust-kernel/rust/kernel.o die__process_class: tag not supported 0x33 (variant_part) at <14f43>! struct <kernel::str::RawFormatter as core::fmt::Write>::{vtable_type} { () * drop_in_place __attribute__((__aligned__(8))); /* 0 8 */ usize size __attribute__((__aligned__(8))); /* 8 8 */ usize align __attribute__((__aligned__(8))); /* 16 8 */ () * __method3 __attribute__((__aligned__(8))); /* 24 8 */ () * __method4 __attribute__((__aligned__(8))); /* 32 8 */ () * __method5 __attribute__((__aligned__(8))); /* 40 8 */ /* size: 48, cachelines: 1, members: 6 */ /* forced alignments: 6 */ /* last cacheline: 48 bytes */ } __attribute__((__aligned__(8))); ⬢[acme@toolbox linux]$ That DW_TAG_variant_part warning would show up without this series, so seems to be working as expected :-) Reviewed-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Matthew Maurer <mmaurer@google.com> Tested-by: Alan Maguire <alan.maguire@oracle.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alice Ryhl <aliceryhl@google.com> Cc: rust-for-linux@vger.kernel.org Link: https://lore.kernel.org/r/20240801185054.2518383-1-mmaurer@google.com [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
- Loading branch information