From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
Andrii Nakryiko <andriin@fb.com>, Alexei Starovoitov <ast@fb.com>,
dwarves@vger.kernel.org, bpf@vger.kernel.org, kernel-team@fb.com,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Wang Nan <wangnan0@huawei.com>
Subject: Re: [PATCH pahole 2/2] btf_encoder: run BTF deduplication before writing out to ELF
Date: Tue, 19 Feb 2019 10:56:22 -0300 [thread overview]
Message-ID: <20190219135622.GZ31177@kernel.org> (raw)
In-Reply-To: <CAEf4BzYCD91JaoJyTRi2i3BS69=TkJVh34uc8++Wwd7B5nExLA@mail.gmail.com>
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@gmail.com> 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
prev parent reply other threads:[~2019-02-19 13:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-17 8:20 [PATCH pahole 0/2] Add support for BTF deduplication Andrii Nakryiko
2019-02-17 8:20 ` [PATCH pahole 1/2] libbpf: pull latest libbpf and build libbpf as shared lib Andrii Nakryiko
2019-02-18 12:48 ` Arnaldo Carvalho de Melo
2019-02-17 8:20 ` [PATCH pahole 2/2] btf_encoder: run BTF deduplication before writing out to ELF Andrii Nakryiko
[not found] ` <20190218142900.GR31177@kernel.org>
2019-02-18 19:38 ` Andrii Nakryiko
2019-02-18 19:55 ` Arnaldo Carvalho de Melo
2019-02-19 2:44 ` Andrii Nakryiko
2019-02-19 2:46 ` Alexei Starovoitov
2019-02-19 13:56 ` Arnaldo Carvalho de Melo [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=20190219135622.GZ31177@kernel.org \
--to=acme@kernel.org \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=arnaldo.melo@gmail.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=kernel-team@fb.com \
--cc=namhyung@kernel.org \
--cc=wangnan0@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox