Re: [PATCH dwarves 2/3] dwarves_fprintf: support skipping modifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2023-03-13 at 16:37 +0000, Alan Maguire wrote:
[...]
> sure; try adding "--skip_encoding_btf_inconsistent_proto --btf_gen_optimized".
> I was testing with gcc 11.2.1.

pahole -F dwarf \
       --flat_arrays \
       --sort --jobs \
       --suppress_aligned_attribute \
       --suppress_force_paddings \
       --suppress_packed \
       --lang_exclude rust \
       --show_private_classes \
       --skip_encoding_btf_inconsistent_proto \
       --btf_gen_optimized \
       ./vmlinux

Like this, right?
gcc 11.3, pahole master, still don't see this in function prototypes,
maybe I have a simpler kernel config...

[...]

> > On the other hand, I see it in a few structure definitions, e.g. here
> > is original C code (include/linux/sysrq.h:32):
> > 
> >     struct sysrq_key_op {
> >     	void (* const handler)(int);
> >     	const char * const help_msg;
> >     	const char * const action_msg;
> >     	const int enable_mask;
> >     };
> > 
> > And here is how it is reconstructed from DWARF (same happens when
> > reconstructed from BTF):
> > 
> >     struct sysrq_key_op {
> >             const void                 (*handler)(int);      /*     0     8 */
> >             const const char  *        help_msg;             /*     8     8 */
> >             const const char  *        action_msg;           /*    16     8 */
> >             const int                  enable_mask;          /*    24     4 */
> >     
> >             /* size: 32, cachelines: 1, members: 4 */
> >             /* padding: 4 */
> >             /* last cacheline: 32 bytes */
> >     };
> > 
> > So it seems to be a general issue with modifiers printing.
> > 
> 
> So it seems like the modifier ordering isn't preserved, even though
> the final BTF representation looks right? Thanks!

Yes, BTF looks right, bpftool prints the structure correctly.

[...]




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux