[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-15 Thread David Faust via Phabricator via cfe-commits
dfaust added a comment. > Type tag for CVR modifier type > > C: > > volatile int __attribute__((btf_type_tag("__b"))) b; > > DWARF: > > 0x31: DW_TAG_variable > DW_AT_name ("b") > DW_AT_type (0x3c "volatile int") > > 0x3c: DW_TAG_volatile_type >

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-15 Thread David Faust via Phabricator via cfe-commits
dfaust added a comment. > in the final BTF, type tags have to precede CVR modifiers, e.g. TYPE_TAG > 'foo' -> CONST -> INT. Right now pahole does not do any reordering, so I > ended up putting the type tag annotations on the DIE with outermost modifier. > Will see if DI maintainers would be o

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-16 Thread David Faust via Phabricator via cfe-commits
dfaust added a comment. In D143967#4197288 , @eddyz87 wrote: > ... > I think there are two sides to this: > > - conceptual: is it ok to allow annotations for CVR modifiers? Maybe someone more an expert in DWARF could chime in whether this is problematic

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-29 Thread David Faust via Phabricator via cfe-commits
dfaust added a comment. In D143967#4220233 , @jemarch wrote: >> eddyz87 added a comment. >> >> In D143967#4200331 >> https://reviews.llvm.org/D143967#4200331, @dfaust wrote: >> >>> In D143967#4197288

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-29 Thread David Faust via Phabricator via cfe-commits
dfaust added a comment. In D143967#4231911 , @jemarch wrote: >> eddyz87 added a subscriber: anakryiko. >> eddyz87 added a comment. >> >> In D143967#4231746 >> https://reviews.llvm.org/D143967#4231746, @jemarch w

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-16 Thread David Faust via Phabricator via cfe-commits
dfaust added a comment. In D143967#4343841 , @eddyz87 wrote: > Changes to avoid attaching type tags to DWARF derived types for > const/volatile/restrict qualifiers. I just tested this locally and can confirm it LGTM in terms of implementing the DWARF f

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-04-19 Thread David Faust via Phabricator via cfe-commits
dfaust added a comment. In D143967#4233742 , @eddyz87 wrote: > Moving type tags past typedefs would also make C code reconstruction from BTF > incomplete. Such reconstruction is used now by e.g. bpftool to create a > vmlinux.h header with all kernel typ