From: Jiri Olsa <olsajiri@gmail.com>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: Jiri Olsa <olsajiri@gmail.com>,
Stephen Brennan <stephen.s.brennan@oracle.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
bpf@vger.kernel.org, dwarves@vger.kernel.org,
linux-debuggers@vger.kernel.org
Subject: Re: [PATCH dwarves v2 4/4] btf_encoder: add global_var feature to encode globals
Date: Thu, 3 Oct 2024 15:10:42 +0200 [thread overview]
Message-ID: <Zv6X0ij1UXhFq2CW@krava> (raw)
In-Reply-To: <df3c21d4-9f42-4681-b7bb-78134f430f1c@oracle.com>
On Wed, Oct 02, 2024 at 04:11:23PM +0100, Alan Maguire wrote:
SNIP
> >> diff --git a/man-pages/pahole.1 b/man-pages/pahole.1
> >> index 0a9d8ac..4bc2d03 100644
> >> --- a/man-pages/pahole.1
> >> +++ b/man-pages/pahole.1
> >> @@ -230,7 +230,10 @@ the debugging information.
> >>
> >> .TP
> >> .B \-\-skip_encoding_btf_vars
> >> -Do not encode VARs in BTF.
> >> +.TQ
> >> +.B \-\-encode_btf_global_vars
> >> +By default, VARs are encoded only for percpu variables. These options allow
> >> +to skip encoding them, or alternatively to encode all global variables too.
> >>
> >> .TP
> >> .B \-\-skip_encoding_btf_decl_tag
> >> @@ -296,7 +299,8 @@ Encode BTF using the specified feature list, or specify 'default' for all standa
> >> encode_force Ignore invalid symbols when encoding BTF; for example
> >> if a symbol has an invalid name, it will be ignored
> >> and BTF encoding will continue.
> >> - var Encode variables using BTF_KIND_VAR in BTF.
> >> + var Encode percpu variables using BTF_KIND_VAR in BTF.
> >> + global_var Encode all global variables in the same way.
> >
> > hi,
> > I tried to test this but I'm not getting DATASEC sections in the BTF,
> > is the change below enough to enable this in kernel build?
> >
>
> Yep, that looks right to me and it's what I did to test with kernel
> builds. For me that was enough to get datasecs and all global variables,
> but if it doesn't work at your end we can take a look. Thanks!
I managed to get all that by running pahole directly,
will check it closely with the new version of that patchset
thanks,
jirka
>
> Stephen, maybe for the respun patches we could add a note to the cover
> letter on how to test with kernel builds? Thanks!
>
> Alan
>
> > thanks,
> > jirka
> >
> >
> > ---
> > diff --git a/scripts/Makefile.btf b/scripts/Makefile.btf
> > index b75f09f3f424..c88d9e526426 100644
> > --- a/scripts/Makefile.btf
> > +++ b/scripts/Makefile.btf
> > @@ -19,7 +19,7 @@ pahole-flags-$(call test-ge, $(pahole-ver), 125) += --skip_encoding_btf_inconsis
> > else
> >
> > # Switch to using --btf_features for v1.26 and later.
> > -pahole-flags-$(call test-ge, $(pahole-ver), 126) = -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs
> > +pahole-flags-$(call test-ge, $(pahole-ver), 126) = -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs,global_var
> >
> > ifneq ($(KBUILD_EXTMOD),)
> > module-pahole-flags-$(call test-ge, $(pahole-ver), 126) += --btf_features=distilled_base
>
prev parent reply other threads:[~2024-10-03 13:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 8:18 [PATCH dwarves v2 0/4] Emit global variables in BTF Stephen Brennan
2024-09-20 8:18 ` [PATCH dwarves v2 1/4] dutil: return ELF section name when looked up by index Stephen Brennan
2024-09-20 8:18 ` [PATCH dwarves v2 2/4] dwarf_loader: add "artificial" and "top_level" variable flags Stephen Brennan
2024-09-20 8:19 ` [PATCH dwarves v2 3/4] btf_encoder: cache all ELF section info Stephen Brennan
2024-09-20 8:19 ` [PATCH dwarves v2 4/4] btf_encoder: add global_var feature to encode globals Stephen Brennan
2024-10-01 15:07 ` Arnaldo Carvalho de Melo
2024-10-01 17:13 ` Andrii Nakryiko
2024-10-01 18:52 ` Arnaldo Carvalho de Melo
2024-10-01 22:35 ` Stephen Brennan
2024-10-02 14:14 ` Jiri Olsa
2024-10-02 15:11 ` Alan Maguire
2024-10-03 13:10 ` Jiri Olsa [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=Zv6X0ij1UXhFq2CW@krava \
--to=olsajiri@gmail.com \
--cc=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=bpf@vger.kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=linux-debuggers@vger.kernel.org \
--cc=stephen.s.brennan@oracle.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 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.