* [PATCH dwarves] btf: Add --btf_gen_all flag
@ 2021-03-12 0:08 Ilya Leoshkevich
2021-03-12 13:39 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Ilya Leoshkevich @ 2021-03-12 0:08 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Andrii Nakryiko
Cc: dwarves, bpf, Alexei Starovoitov, Daniel Borkmann, Yonghong Song,
Heiko Carstens, Vasily Gorbik, Ilya Leoshkevich
By default, pahole makes use only of BTF features introduced with
kernel v5.2. Features that are added later need to be turned on with
explicit feature flags, such as --btf_gen_floats. According to [1],
this will hinder the people who generate BTF for kernels externally
(e.g. for old kernels to support BPF CO-RE).
Introduce --btf_gen_all that allows using all BTF features supported
by pahole.
[1] https://lore.kernel.org/dwarves/CAEf4Bzbyugfb2RkBkRuxNGKwSk40Tbq4zAvhQT8W=fVMYWuaxA@mail.gmail.com/
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
man-pages/pahole.1 | 4 ++++
pahole.c | 8 ++++++++
2 files changed, 12 insertions(+)
diff --git a/man-pages/pahole.1 b/man-pages/pahole.1
index e292b2c..cbbefbf 100644
--- a/man-pages/pahole.1
+++ b/man-pages/pahole.1
@@ -204,6 +204,10 @@ to "/sys/kernel/btf/vmlinux".
Allow producing BTF_KIND_FLOAT entries in systems where the vmlinux DWARF
information has float types.
+.TP
+.B \-\-btf_gen_all
+Allow using all the BTF features supported by pahole.
+
.TP
.B \-l, \-\-show_first_biggest_size_base_type_member
Show first biggest size base_type member.
diff --git a/pahole.c b/pahole.c
index c8d38f5..df6aa83 100644
--- a/pahole.c
+++ b/pahole.c
@@ -826,6 +826,7 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = dwarves_print_version;
#define ARGP_numeric_version 320
#define ARGP_btf_base 321
#define ARGP_btf_gen_floats 322
+#define ARGP_btf_gen_all 323
static const struct argp_option pahole__options[] = {
{
@@ -1125,6 +1126,11 @@ static const struct argp_option pahole__options[] = {
.key = ARGP_btf_gen_floats,
.doc = "Allow producing BTF_KIND_FLOAT entries."
},
+ {
+ .name = "btf_gen_all",
+ .key = ARGP_btf_gen_all,
+ .doc = "Allow using all the BTF features supported by pahole."
+ },
{
.name = "structs",
.key = ARGP_just_structs,
@@ -1262,6 +1268,8 @@ static error_t pahole__options_parser(int key, char *arg,
print_numeric_version = true; break;
case ARGP_btf_gen_floats:
btf_gen_floats = true; break;
+ case ARGP_btf_gen_all:
+ btf_gen_floats = true; break;
default:
return ARGP_ERR_UNKNOWN;
}
--
2.29.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH dwarves] btf: Add --btf_gen_all flag
2021-03-12 0:08 [PATCH dwarves] btf: Add --btf_gen_all flag Ilya Leoshkevich
@ 2021-03-12 13:39 ` Arnaldo Carvalho de Melo
2021-03-23 13:36 ` [PATCH PING " Ilya Leoshkevich
0 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-03-12 13:39 UTC (permalink / raw)
To: Ilya Leoshkevich
Cc: Arnaldo Carvalho de Melo, Andrii Nakryiko, dwarves, bpf,
Alexei Starovoitov, Daniel Borkmann, Yonghong Song,
Heiko Carstens, Vasily Gorbik
Em Fri, Mar 12, 2021 at 01:08:08AM +0100, Ilya Leoshkevich escreveu:
> By default, pahole makes use only of BTF features introduced with
> kernel v5.2. Features that are added later need to be turned on with
> explicit feature flags, such as --btf_gen_floats. According to [1],
> this will hinder the people who generate BTF for kernels externally
> (e.g. for old kernels to support BPF CO-RE).
>
> Introduce --btf_gen_all that allows using all BTF features supported
> by pahole.
>
> [1] https://lore.kernel.org/dwarves/CAEf4Bzbyugfb2RkBkRuxNGKwSk40Tbq4zAvhQT8W=fVMYWuaxA@mail.gmail.com/
Applied locally, testing ongoing.
Also added this:
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
- Arnaldo
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> man-pages/pahole.1 | 4 ++++
> pahole.c | 8 ++++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/man-pages/pahole.1 b/man-pages/pahole.1
> index e292b2c..cbbefbf 100644
> --- a/man-pages/pahole.1
> +++ b/man-pages/pahole.1
> @@ -204,6 +204,10 @@ to "/sys/kernel/btf/vmlinux".
> Allow producing BTF_KIND_FLOAT entries in systems where the vmlinux DWARF
> information has float types.
>
> +.TP
> +.B \-\-btf_gen_all
> +Allow using all the BTF features supported by pahole.
> +
> .TP
> .B \-l, \-\-show_first_biggest_size_base_type_member
> Show first biggest size base_type member.
> diff --git a/pahole.c b/pahole.c
> index c8d38f5..df6aa83 100644
> --- a/pahole.c
> +++ b/pahole.c
> @@ -826,6 +826,7 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = dwarves_print_version;
> #define ARGP_numeric_version 320
> #define ARGP_btf_base 321
> #define ARGP_btf_gen_floats 322
> +#define ARGP_btf_gen_all 323
>
> static const struct argp_option pahole__options[] = {
> {
> @@ -1125,6 +1126,11 @@ static const struct argp_option pahole__options[] = {
> .key = ARGP_btf_gen_floats,
> .doc = "Allow producing BTF_KIND_FLOAT entries."
> },
> + {
> + .name = "btf_gen_all",
> + .key = ARGP_btf_gen_all,
> + .doc = "Allow using all the BTF features supported by pahole."
> + },
> {
> .name = "structs",
> .key = ARGP_just_structs,
> @@ -1262,6 +1268,8 @@ static error_t pahole__options_parser(int key, char *arg,
> print_numeric_version = true; break;
> case ARGP_btf_gen_floats:
> btf_gen_floats = true; break;
> + case ARGP_btf_gen_all:
> + btf_gen_floats = true; break;
> default:
> return ARGP_ERR_UNKNOWN;
> }
> --
> 2.29.2
>
--
- Arnaldo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH PING dwarves] btf: Add --btf_gen_all flag
2021-03-12 13:39 ` Arnaldo Carvalho de Melo
@ 2021-03-23 13:36 ` Ilya Leoshkevich
2021-03-23 18:07 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Ilya Leoshkevich @ 2021-03-23 13:36 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Arnaldo Carvalho de Melo, Andrii Nakryiko, dwarves, bpf,
Alexei Starovoitov, Daniel Borkmann, Yonghong Song,
Heiko Carstens, Vasily Gorbik
On Fri, 2021-03-12 at 10:39 -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Mar 12, 2021 at 01:08:08AM +0100, Ilya Leoshkevich escreveu:
> > By default, pahole makes use only of BTF features introduced with
> > kernel v5.2. Features that are added later need to be turned on with
> > explicit feature flags, such as --btf_gen_floats. According to [1],
> > this will hinder the people who generate BTF for kernels externally
> > (e.g. for old kernels to support BPF CO-RE).
> >
> > Introduce --btf_gen_all that allows using all BTF features supported
> > by pahole.
> >
> > [1]
> > https://lore.kernel.org/dwarves/CAEf4Bzbyugfb2RkBkRuxNGKwSk40Tbq4zAvhQT8W=fVMYWuaxA@mail.gmail.com/
>
> Applied locally, testing ongoing.
>
> Also added this:
>
> Suggested-by: Andrii Nakryiko <andrii@kernel.org>
>
> - Arnaldo
[...]
Hi Arnaldo,
I'd like to ping this patch (and
https://lore.kernel.org/dwarves/20210310201550.170599-1-iii@linux.ibm.com/
too).
Best regards,
Ilya
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH PING dwarves] btf: Add --btf_gen_all flag
2021-03-23 13:36 ` [PATCH PING " Ilya Leoshkevich
@ 2021-03-23 18:07 ` Arnaldo Carvalho de Melo
2021-03-23 18:22 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-03-23 18:07 UTC (permalink / raw)
To: Ilya Leoshkevich
Cc: Arnaldo Carvalho de Melo, Andrii Nakryiko, dwarves, bpf,
Alexei Starovoitov, Daniel Borkmann, Yonghong Song,
Heiko Carstens, Vasily Gorbik
Em Tue, Mar 23, 2021 at 02:36:48PM +0100, Ilya Leoshkevich escreveu:
> On Fri, 2021-03-12 at 10:39 -0300, Arnaldo Carvalho de Melo wrote:
> > Em Fri, Mar 12, 2021 at 01:08:08AM +0100, Ilya Leoshkevich escreveu:
> > > By default, pahole makes use only of BTF features introduced with
> > > kernel v5.2. Features that are added later need to be turned on with
> > > explicit feature flags, such as --btf_gen_floats. According to [1],
> > > this will hinder the people who generate BTF for kernels externally
> > > (e.g. for old kernels to support BPF CO-RE).
> > >
> > > Introduce --btf_gen_all that allows using all BTF features supported
> > > by pahole.
> > >
> > > [1]
> > > https://lore.kernel.org/dwarves/CAEf4Bzbyugfb2RkBkRuxNGKwSk40Tbq4zAvhQT8W=fVMYWuaxA@mail.gmail.com/
> >
> > Applied locally, testing ongoing.
> >
> > Also added this:
> >
> > Suggested-by: Andrii Nakryiko <andrii@kernel.org>
> >
> > - Arnaldo
>
> [...]
>
> Hi Arnaldo,
>
> I'd like to ping this patch (and
> https://lore.kernel.org/dwarves/20210310201550.170599-1-iii@linux.ibm.com/
> too).
So I finally finished testing, pushing out now.
- Arnaldo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH PING dwarves] btf: Add --btf_gen_all flag
2021-03-23 18:07 ` Arnaldo Carvalho de Melo
@ 2021-03-23 18:22 ` Arnaldo Carvalho de Melo
2021-03-23 20:54 ` Ilya Leoshkevich
0 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-03-23 18:22 UTC (permalink / raw)
To: Ilya Leoshkevich
Cc: Arnaldo Carvalho de Melo, Andrii Nakryiko, dwarves, bpf,
Alexei Starovoitov, Daniel Borkmann, Yonghong Song,
Heiko Carstens, Vasily Gorbik
Em Tue, Mar 23, 2021 at 03:07:23PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Mar 23, 2021 at 02:36:48PM +0100, Ilya Leoshkevich escreveu:
> > On Fri, 2021-03-12 at 10:39 -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Fri, Mar 12, 2021 at 01:08:08AM +0100, Ilya Leoshkevich escreveu:
> > > > By default, pahole makes use only of BTF features introduced with
> > > > kernel v5.2. Features that are added later need to be turned on with
> > > > explicit feature flags, such as --btf_gen_floats. According to [1],
> > > > this will hinder the people who generate BTF for kernels externally
> > > > (e.g. for old kernels to support BPF CO-RE).
> > > >
> > > > Introduce --btf_gen_all that allows using all BTF features supported
> > > > by pahole.
> > > >
> > > > [1]
> > > > https://lore.kernel.org/dwarves/CAEf4Bzbyugfb2RkBkRuxNGKwSk40Tbq4zAvhQT8W=fVMYWuaxA@mail.gmail.com/
> > >
> > > Applied locally, testing ongoing.
> > >
> > > Also added this:
> > >
> > > Suggested-by: Andrii Nakryiko <andrii@kernel.org>
> > >
> > > - Arnaldo
> >
> > [...]
> >
> > Hi Arnaldo,
> >
> > I'd like to ping this patch (and
> > https://lore.kernel.org/dwarves/20210310201550.170599-1-iii@linux.ibm.com/
> > too).
>
> So I finally finished testing, pushing out now.
Please check what is in
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/, I'm having some
problems with 2FA on github, will fix soon.
- Arnaldo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH PING dwarves] btf: Add --btf_gen_all flag
2021-03-23 18:22 ` Arnaldo Carvalho de Melo
@ 2021-03-23 20:54 ` Ilya Leoshkevich
0 siblings, 0 replies; 6+ messages in thread
From: Ilya Leoshkevich @ 2021-03-23 20:54 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Arnaldo Carvalho de Melo, Andrii Nakryiko, dwarves, bpf,
Alexei Starovoitov, Daniel Borkmann, Yonghong Song,
Heiko Carstens, Vasily Gorbik
On Tue, 2021-03-23 at 15:22 -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Mar 23, 2021 at 03:07:23PM -0300, Arnaldo Carvalho de Melo
> escreveu:
> > Em Tue, Mar 23, 2021 at 02:36:48PM +0100, Ilya Leoshkevich
> > escreveu:
> > > On Fri, 2021-03-12 at 10:39 -0300, Arnaldo Carvalho de Melo
> > > wrote:
> > > > Em Fri, Mar 12, 2021 at 01:08:08AM +0100, Ilya Leoshkevich
> > > > escreveu:
> > > > > By default, pahole makes use only of BTF features introduced
> > > > > with
> > > > > kernel v5.2. Features that are added later need to be turned
> > > > > on with
> > > > > explicit feature flags, such as --btf_gen_floats. According
> > > > > to [1],
> > > > > this will hinder the people who generate BTF for kernels
> > > > > externally
> > > > > (e.g. for old kernels to support BPF CO-RE).
> > > > >
> > > > > Introduce --btf_gen_all that allows using all BTF features
> > > > > supported
> > > > > by pahole.
> > > > >
> > > > > [1]
> > > > > https://lore.kernel.org/dwarves/CAEf4Bzbyugfb2RkBkRuxNGKwSk40Tbq4zAvhQT8W=fVMYWuaxA@mail.gmail.com/
> > > >
> > > > Applied locally, testing ongoing.
> > > >
> > > > Also added this:
> > > >
> > > > Suggested-by: Andrii Nakryiko <andrii@kernel.org>
> > > >
> > > > - Arnaldo
> > >
> > > [...]
> > >
> > > Hi Arnaldo,
> > >
> > > I'd like to ping this patch (and
> > > https://lore.kernel.org/dwarves/20210310201550.170599-1-iii@linux.ibm.com/
> > > too).
> >
> > So I finally finished testing, pushing out now.
>
> Please check what is in
> https://git.kernel.org/pub/scm/devel/pahole/pahole.git/, I'm having
> some
> problems with 2FA on github, will fix soon.
>
> - Arnaldo
That looks good, thanks!
s390 seems to run fine again with the latest bpf-next / llvm / pahole.
Now I can finally give adding s390 to the libbpf CI another try :-)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-23 20:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 0:08 [PATCH dwarves] btf: Add --btf_gen_all flag Ilya Leoshkevich
2021-03-12 13:39 ` Arnaldo Carvalho de Melo
2021-03-23 13:36 ` [PATCH PING " Ilya Leoshkevich
2021-03-23 18:07 ` Arnaldo Carvalho de Melo
2021-03-23 18:22 ` Arnaldo Carvalho de Melo
2021-03-23 20:54 ` Ilya Leoshkevich
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.