From: Xianting Tian <xianting.tian@linux.alibaba.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: dwarves@vger.kernel.org
Subject: Re: pahole failed to get some struct info
Date: Tue, 12 Oct 2021 09:31:28 +0800 [thread overview]
Message-ID: <11bd09e0-b518-20c3-959a-2b5f42c9d54f@linux.alibaba.com> (raw)
In-Reply-To: <YWSImJiz3VjD/ArG@kernel.org>
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+]$
prev parent reply other threads:[~2021-10-12 1:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11bd09e0-b518-20c3-959a-2b5f42c9d54f@linux.alibaba.com \
--to=xianting.tian@linux.alibaba.com \
--cc=acme@kernel.org \
--cc=dwarves@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.