Em Mon, Feb 18, 2019 at 11:38:41AM -0800, Andrii Nakryiko escreveu: > On Mon, Feb 18, 2019 at 6:29 AM Arnaldo Carvalho de Melo <arnaldo.melo@xxxxxxxxx> wrote: > > Em Sun, Feb 17, 2019 at 12:20:18AM -0800, Andrii Nakryiko escreveu: > > The 'struct sun_disklabel' is interesting, pahole doesn't print it for > > the DWARF case when pretty printing all structs, but it works for the > > BTF case, I'll investigate. > I wonder if that has something to do with the fact that btf_dedup also > does FWD -> STRUCT/UNION resolution? Nope, when printing the classes (structs and class) pahole has this show_private_classes option, so that structs and classes that are defined inside other classes or functions are only shown when you ask for that, and that is what sun_disklabel is, it is defined in block/partitions/sun.c as: int sun_partition(struct parsed_partitions *state) { int i; __be16 csum; int slot = 1; __be16 *ush; Sector sect; struct sun_disklabel { unsigned char info[128]; /* Informative text string */ struct sun_vtoc { __be32 version; /* Layout version */ char volume[8]; /* Volume name */ __be16 nparts; /* Number of partitions */ struct sun_info { /* Partition hdrs, sec 2 */ __be16 id; __be16 flags; } infos[8]; <SNIP> This information gets lost when we convert it to BTF, so for btfdiff I'll add that option: --show_private_classes Show classes that are defined inside other classes or in functions When printing from DWARF info. - Arnaldo