[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200907162726.o36peh673a7l46kn@distanz.ch>
Date: Mon, 7 Sep 2020 18:27:26 +0200
From: Tobias Klauser <tklauser@...tanz.ch>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Jiri Olsa <jolsa@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
bpf@...r.kernel.org, Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Jesper Dangaard Brouer <brouer@...hat.com>
Subject: Re: [PATCH] perf tools: Do not use deprecated bpf_program__title
On 2020-09-07 at 18:22:49 +0200, Jiri Olsa <jolsa@...hat.com> wrote:
> On Mon, Sep 07, 2020 at 05:59:46PM +0200, Tobias Klauser wrote:
> > On 2020-09-07 at 13:05:49 +0200, Jiri Olsa <jolsa@...hat.com> wrote:
> > > On Mon, Sep 07, 2020 at 01:02:37PM +0200, Jiri Olsa wrote:
> > > > The bpf_program__title function got deprecated in libbpf,
> > > > use the suggested alternative.
> > > >
> > > > Fixes: 521095842027 ("libbpf: Deprecate notion of BPF program "title" in favor of "section name"")
> > > > Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> > >
> > > Arnaldo,
> > > the commit in 'Fixes' is not yet in your tree yet and the patch
> > > below will make the perf compilation fail in your perf/core..
> > >
> > > it fixes perf compilation on top of bpf-next tree.. so I think it
> > > should go in through bpf-next tree
> > >
> > > thanks,
> > > jirka
> > >
> > > > ---
> > > > tools/perf/util/bpf-loader.c | 4 ++--
> > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
> > > > index 2feb751516ab..73de3973c8ec 100644
> > > > --- a/tools/perf/util/bpf-loader.c
> > > > +++ b/tools/perf/util/bpf-loader.c
> > > > @@ -328,7 +328,7 @@ config_bpf_program(struct bpf_program *prog)
> > > > probe_conf.no_inlines = false;
> > > > probe_conf.force_add = false;
> > > >
> > > > - config_str = bpf_program__title(prog, false);
> > > > + config_str = bpf_program__section_name(prog);
> > > > if (IS_ERR(config_str)) {
> > > > pr_debug("bpf: unable to get title for program\n");
> > > > return PTR_ERR(config_str);
> > > > @@ -454,7 +454,7 @@ preproc_gen_prologue(struct bpf_program *prog, int n,
> > > > if (err) {
> > > > const char *title;
> > > >
> > > > - title = bpf_program__title(prog, false);
> > > > + title = bpf_program__section_name(prog);
> > > > if (!title)
> > > > title = "[unknown]";
> >
> > I think bpf_program__title at line 457 in preproc_gen_prologue also needs to be
> > changed given the following build failure:
>
> hum, that's where the 2nd hunk, right? I dont see any other instance
> of bpf_program__title after the patch is applied
Sorry for the noise, I didn't read the patch correctly. You're of course
correct. I was confused because it is still assigned to variable
`title`.
Reviewed-by: Tobias Klauser <tklauser@...tanz.ch>
Thanks
Tobias
Powered by blists - more mailing lists