All of lore.kernel.org
 help / color / mirror / Atom feed
* pahole failed to get some struct info
@ 2021-10-10  6:09 Xianting Tian
  2021-10-11 18:55 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Xianting Tian @ 2021-10-10  6:09 UTC (permalink / raw)
  To: dwarves

Hi,

Sorry to disturb you, when I use below command to get info about 'struct 
hvc_struct', it failed.

$ pahole -C hvc_struct vmlinux
die__process_function: tag not supported (INVALID)!
die__process_unit: DW_TAG_dwarf_procedure (0x36) @ <0x4ebf4c> not handled!

But when I try some common struct, it is OK.

$pahole -C task_struct vmlinux

Could you help me how to fix the issue?  thanks a lot.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pahole failed to get some struct info
  2021-10-10  6:09 pahole failed to get some struct info Xianting Tian
@ 2021-10-11 18:55 ` Arnaldo Carvalho de Melo
  2021-10-12  1:31   ` Xianting Tian
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-10-11 18:55 UTC (permalink / raw)
  To: Xianting Tian; +Cc: dwarves

Em Sun, Oct 10, 2021 at 02:09:10PM +0800, Xianting Tian escreveu:
> Hi,

> Sorry to disturb you, when I use below command to get info about 'struct
> hvc_struct', it failed.

> $ pahole -C hvc_struct vmlinux
> die__process_function: tag not supported (INVALID)!
> die__process_unit: DW_TAG_dwarf_procedure (0x36) @ <0x4ebf4c> not handled!
 
> But when I try some common struct, it is OK.
 
> $ pahole -C task_struct vmlinux
 
> Could you help me how to fix the issue?  thanks a lot.

Using:

⬢[acme@toolbox v5.14.0-rc6+]$ pahole --version
v1.22

I see no problems, be it from DWARF or from BTF, in the various ways to
ask for that struct:

⬢[acme@toolbox v5.14.0-rc6+]$ pahole -C hvc_struct vmlinux
struct hvc_struct {
	struct tty_port            port;                 /*     0   352 */
	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
	spinlock_t                 lock;                 /*   352     4 */
	int                        index;                /*   356     4 */
	int                        do_wakeup;            /*   360     4 */

	/* XXX 4 bytes hole, try to pack */

	char *                     outbuf;               /*   368     8 */
	int                        outbuf_size;          /*   376     4 */
	int                        n_outbuf;             /*   380     4 */
	/* --- cacheline 6 boundary (384 bytes) --- */
	uint32_t                   vtermno;              /*   384     4 */

	/* XXX 4 bytes hole, try to pack */

	const struct hv_ops  *     ops;                  /*   392     8 */
	int                        irq_requested;        /*   400     4 */
	int                        data;                 /*   404     4 */
	struct winsize             ws;                   /*   408     8 */
	struct work_struct         tty_resize;           /*   416    32 */
	/* --- cacheline 7 boundary (448 bytes) --- */
	struct list_head           next;                 /*   448    16 */
	long unsigned int          flags;                /*   464     8 */

	/* size: 472, cachelines: 8, members: 15 */
	/* sum members: 464, holes: 2, sum holes: 8 */
	/* last cacheline: 24 bytes */
};
⬢[acme@toolbox v5.14.0-rc6+]$ pahole hvc_struct
struct hvc_struct {
	struct tty_port            port;                 /*     0   352 */
	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
	spinlock_t                 lock;                 /*   352     4 */
	int                        index;                /*   356     4 */
	int                        do_wakeup;            /*   360     4 */

	/* XXX 4 bytes hole, try to pack */

	char *                     outbuf;               /*   368     8 */
	int                        outbuf_size;          /*   376     4 */
	int                        n_outbuf;             /*   380     4 */
	/* --- cacheline 6 boundary (384 bytes) --- */
	uint32_t                   vtermno;              /*   384     4 */

	/* XXX 4 bytes hole, try to pack */

	const struct hv_ops  *     ops;                  /*   392     8 */
	int                        irq_requested;        /*   400     4 */
	int                        data;                 /*   404     4 */
	struct winsize             ws;                   /*   408     8 */
	struct work_struct         tty_resize;           /*   416    32 */
	/* --- cacheline 7 boundary (448 bytes) --- */
	struct list_head           next;                 /*   448    16 */
	long unsigned int          flags;                /*   464     8 */

	/* size: 472, cachelines: 8, members: 15 */
	/* sum members: 464, holes: 2, sum holes: 8 */
	/* last cacheline: 24 bytes */
};
⬢[acme@toolbox v5.14.0-rc6+]$

⬢[acme@toolbox v5.14.0-rc6+]$ pahole -F dwarf -C hvc_struct vmlinux
struct hvc_struct {
	struct tty_port            port;                 /*     0   352 */
	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
	spinlock_t                 lock;                 /*   352     4 */
	int                        index;                /*   356     4 */
	int                        do_wakeup;            /*   360     4 */

	/* XXX 4 bytes hole, try to pack */

	char *                     outbuf;               /*   368     8 */
	int                        outbuf_size;          /*   376     4 */
	int                        n_outbuf;             /*   380     4 */
	/* --- cacheline 6 boundary (384 bytes) --- */
	uint32_t                   vtermno;              /*   384     4 */

	/* XXX 4 bytes hole, try to pack */

	const struct hv_ops  *     ops;                  /*   392     8 */
	int                        irq_requested;        /*   400     4 */
	int                        data;                 /*   404     4 */
	struct winsize             ws;                   /*   408     8 */
	struct work_struct         tty_resize;           /*   416    32 */
	/* --- cacheline 7 boundary (448 bytes) --- */
	struct list_head           next;                 /*   448    16 */
	long unsigned int          flags;                /*   464     8 */

	/* size: 472, cachelines: 8, members: 15 */
	/* sum members: 464, holes: 2, sum holes: 8 */
	/* last cacheline: 24 bytes */
};
⬢[acme@toolbox v5.14.0-rc6+]$ pahole -F btf -C hvc_struct vmlinux
struct hvc_struct {
	struct tty_port            port;                 /*     0   352 */
	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
	spinlock_t                 lock;                 /*   352     4 */
	int                        index;                /*   356     4 */
	int                        do_wakeup;            /*   360     4 */

	/* XXX 4 bytes hole, try to pack */

	char *                     outbuf;               /*   368     8 */
	int                        outbuf_size;          /*   376     4 */
	int                        n_outbuf;             /*   380     4 */
	/* --- cacheline 6 boundary (384 bytes) --- */
	uint32_t                   vtermno;              /*   384     4 */

	/* XXX 4 bytes hole, try to pack */

	const struct hv_ops  *     ops;                  /*   392     8 */
	int                        irq_requested;        /*   400     4 */
	int                        data;                 /*   404     4 */
	struct winsize             ws;                   /*   408     8 */
	struct work_struct         tty_resize;           /*   416    32 */
	/* --- cacheline 7 boundary (448 bytes) --- */
	struct list_head           next;                 /*   448    16 */
	long unsigned int          flags;                /*   464     8 */

	/* size: 472, cachelines: 8, members: 15 */
	/* sum members: 464, holes: 2, sum holes: 8 */
	/* last cacheline: 24 bytes */
};


⬢[acme@toolbox v5.14.0-rc6+]$ pahole --help | grep decl
  -D, --decl_exclude=PREFIX  exclude classes declared in files with PREFIX
  -I, --show_decl_info       Show the file and line number where the tags were
⬢[acme@toolbox v5.14.0-rc6+]$ pahole -IF dwarf -C hvc_struct vmlinux
/* Used at: /var/home/acme/git/perf/drivers/tty/hvc/hvc_console.c */
/* <65c08c8> /var/home/acme/git/perf/drivers/tty/hvc/hvc_console.h:35 */
struct hvc_struct {
	struct tty_port            port;                 /*     0   352 */
	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
	spinlock_t                 lock;                 /*   352     4 */
	int                        index;                /*   356     4 */
	int                        do_wakeup;            /*   360     4 */

	/* XXX 4 bytes hole, try to pack */

	char *                     outbuf;               /*   368     8 */
	int                        outbuf_size;          /*   376     4 */
	int                        n_outbuf;             /*   380     4 */
	/* --- cacheline 6 boundary (384 bytes) --- */
	uint32_t                   vtermno;              /*   384     4 */

	/* XXX 4 bytes hole, try to pack */

	const struct hv_ops  *     ops;                  /*   392     8 */
	int                        irq_requested;        /*   400     4 */
	int                        data;                 /*   404     4 */
	struct winsize             ws;                   /*   408     8 */
	struct work_struct         tty_resize;           /*   416    32 */
	/* --- cacheline 7 boundary (448 bytes) --- */
	struct list_head           next;                 /*   448    16 */
	long unsigned int          flags;                /*   464     8 */

	/* size: 472, cachelines: 8, members: 15 */
	/* sum members: 464, holes: 2, sum holes: 8 */
	/* last cacheline: 24 bytes */
};
⬢[acme@toolbox v5.14.0-rc6+]$

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pahole failed to get some struct info
  2021-10-11 18:55 ` Arnaldo Carvalho de Melo
@ 2021-10-12  1:31   ` Xianting Tian
  0 siblings, 0 replies; 3+ messages in thread
From: Xianting Tian @ 2021-10-12  1:31 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: dwarves

thanks a lot for the response,

I will try the new version, my current version seems too old.

$ pahole  --version
v1.9

在 2021/10/12 上午2:55, Arnaldo Carvalho de Melo 写道:
> Em Sun, Oct 10, 2021 at 02:09:10PM +0800, Xianting Tian escreveu:
>> Hi,
>> Sorry to disturb you, when I use below command to get info about 'struct
>> hvc_struct', it failed.
>> $ pahole -C hvc_struct vmlinux
>> die__process_function: tag not supported (INVALID)!
>> die__process_unit: DW_TAG_dwarf_procedure (0x36) @ <0x4ebf4c> not handled!
>   
>> But when I try some common struct, it is OK.
>   
>> $ pahole -C task_struct vmlinux
>   
>> Could you help me how to fix the issue?  thanks a lot.
> Using:
>
> ⬢[acme@toolbox v5.14.0-rc6+]$ pahole --version
> v1.22
>
> I see no problems, be it from DWARF or from BTF, in the various ways to
> ask for that struct:
>
> ⬢[acme@toolbox v5.14.0-rc6+]$ pahole -C hvc_struct vmlinux
> struct hvc_struct {
> 	struct tty_port            port;                 /*     0   352 */
> 	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
> 	spinlock_t                 lock;                 /*   352     4 */
> 	int                        index;                /*   356     4 */
> 	int                        do_wakeup;            /*   360     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	char *                     outbuf;               /*   368     8 */
> 	int                        outbuf_size;          /*   376     4 */
> 	int                        n_outbuf;             /*   380     4 */
> 	/* --- cacheline 6 boundary (384 bytes) --- */
> 	uint32_t                   vtermno;              /*   384     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	const struct hv_ops  *     ops;                  /*   392     8 */
> 	int                        irq_requested;        /*   400     4 */
> 	int                        data;                 /*   404     4 */
> 	struct winsize             ws;                   /*   408     8 */
> 	struct work_struct         tty_resize;           /*   416    32 */
> 	/* --- cacheline 7 boundary (448 bytes) --- */
> 	struct list_head           next;                 /*   448    16 */
> 	long unsigned int          flags;                /*   464     8 */
>
> 	/* size: 472, cachelines: 8, members: 15 */
> 	/* sum members: 464, holes: 2, sum holes: 8 */
> 	/* last cacheline: 24 bytes */
> };
> ⬢[acme@toolbox v5.14.0-rc6+]$ pahole hvc_struct
> struct hvc_struct {
> 	struct tty_port            port;                 /*     0   352 */
> 	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
> 	spinlock_t                 lock;                 /*   352     4 */
> 	int                        index;                /*   356     4 */
> 	int                        do_wakeup;            /*   360     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	char *                     outbuf;               /*   368     8 */
> 	int                        outbuf_size;          /*   376     4 */
> 	int                        n_outbuf;             /*   380     4 */
> 	/* --- cacheline 6 boundary (384 bytes) --- */
> 	uint32_t                   vtermno;              /*   384     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	const struct hv_ops  *     ops;                  /*   392     8 */
> 	int                        irq_requested;        /*   400     4 */
> 	int                        data;                 /*   404     4 */
> 	struct winsize             ws;                   /*   408     8 */
> 	struct work_struct         tty_resize;           /*   416    32 */
> 	/* --- cacheline 7 boundary (448 bytes) --- */
> 	struct list_head           next;                 /*   448    16 */
> 	long unsigned int          flags;                /*   464     8 */
>
> 	/* size: 472, cachelines: 8, members: 15 */
> 	/* sum members: 464, holes: 2, sum holes: 8 */
> 	/* last cacheline: 24 bytes */
> };
> ⬢[acme@toolbox v5.14.0-rc6+]$
>
> ⬢[acme@toolbox v5.14.0-rc6+]$ pahole -F dwarf -C hvc_struct vmlinux
> struct hvc_struct {
> 	struct tty_port            port;                 /*     0   352 */
> 	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
> 	spinlock_t                 lock;                 /*   352     4 */
> 	int                        index;                /*   356     4 */
> 	int                        do_wakeup;            /*   360     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	char *                     outbuf;               /*   368     8 */
> 	int                        outbuf_size;          /*   376     4 */
> 	int                        n_outbuf;             /*   380     4 */
> 	/* --- cacheline 6 boundary (384 bytes) --- */
> 	uint32_t                   vtermno;              /*   384     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	const struct hv_ops  *     ops;                  /*   392     8 */
> 	int                        irq_requested;        /*   400     4 */
> 	int                        data;                 /*   404     4 */
> 	struct winsize             ws;                   /*   408     8 */
> 	struct work_struct         tty_resize;           /*   416    32 */
> 	/* --- cacheline 7 boundary (448 bytes) --- */
> 	struct list_head           next;                 /*   448    16 */
> 	long unsigned int          flags;                /*   464     8 */
>
> 	/* size: 472, cachelines: 8, members: 15 */
> 	/* sum members: 464, holes: 2, sum holes: 8 */
> 	/* last cacheline: 24 bytes */
> };
> ⬢[acme@toolbox v5.14.0-rc6+]$ pahole -F btf -C hvc_struct vmlinux
> struct hvc_struct {
> 	struct tty_port            port;                 /*     0   352 */
> 	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
> 	spinlock_t                 lock;                 /*   352     4 */
> 	int                        index;                /*   356     4 */
> 	int                        do_wakeup;            /*   360     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	char *                     outbuf;               /*   368     8 */
> 	int                        outbuf_size;          /*   376     4 */
> 	int                        n_outbuf;             /*   380     4 */
> 	/* --- cacheline 6 boundary (384 bytes) --- */
> 	uint32_t                   vtermno;              /*   384     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	const struct hv_ops  *     ops;                  /*   392     8 */
> 	int                        irq_requested;        /*   400     4 */
> 	int                        data;                 /*   404     4 */
> 	struct winsize             ws;                   /*   408     8 */
> 	struct work_struct         tty_resize;           /*   416    32 */
> 	/* --- cacheline 7 boundary (448 bytes) --- */
> 	struct list_head           next;                 /*   448    16 */
> 	long unsigned int          flags;                /*   464     8 */
>
> 	/* size: 472, cachelines: 8, members: 15 */
> 	/* sum members: 464, holes: 2, sum holes: 8 */
> 	/* last cacheline: 24 bytes */
> };
>
>
> ⬢[acme@toolbox v5.14.0-rc6+]$ pahole --help | grep decl
>    -D, --decl_exclude=PREFIX  exclude classes declared in files with PREFIX
>    -I, --show_decl_info       Show the file and line number where the tags were
> ⬢[acme@toolbox v5.14.0-rc6+]$ pahole -IF dwarf -C hvc_struct vmlinux
> /* Used at: /var/home/acme/git/perf/drivers/tty/hvc/hvc_console.c */
> /* <65c08c8> /var/home/acme/git/perf/drivers/tty/hvc/hvc_console.h:35 */
> struct hvc_struct {
> 	struct tty_port            port;                 /*     0   352 */
> 	/* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */
> 	spinlock_t                 lock;                 /*   352     4 */
> 	int                        index;                /*   356     4 */
> 	int                        do_wakeup;            /*   360     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	char *                     outbuf;               /*   368     8 */
> 	int                        outbuf_size;          /*   376     4 */
> 	int                        n_outbuf;             /*   380     4 */
> 	/* --- cacheline 6 boundary (384 bytes) --- */
> 	uint32_t                   vtermno;              /*   384     4 */
>
> 	/* XXX 4 bytes hole, try to pack */
>
> 	const struct hv_ops  *     ops;                  /*   392     8 */
> 	int                        irq_requested;        /*   400     4 */
> 	int                        data;                 /*   404     4 */
> 	struct winsize             ws;                   /*   408     8 */
> 	struct work_struct         tty_resize;           /*   416    32 */
> 	/* --- cacheline 7 boundary (448 bytes) --- */
> 	struct list_head           next;                 /*   448    16 */
> 	long unsigned int          flags;                /*   464     8 */
>
> 	/* size: 472, cachelines: 8, members: 15 */
> 	/* sum members: 464, holes: 2, sum holes: 8 */
> 	/* last cacheline: 24 bytes */
> };
> ⬢[acme@toolbox v5.14.0-rc6+]$

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-12  1:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-10  6:09 pahole failed to get some struct info Xianting Tian
2021-10-11 18:55 ` Arnaldo Carvalho de Melo
2021-10-12  1:31   ` Xianting Tian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.