All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Ian Rogers <irogers@google.com>,
	"linux-perf-use." <linux-perf-users@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>, Andrii Nakryiko <andrii@kernel.org>
Subject: Re: [PATCHv2 0/3] perf/bpf: Replace deprecated code
Date: Fri, 18 Feb 2022 10:01:56 +0100	[thread overview]
Message-ID: <Yg9ghL33UYyh3es4@krava> (raw)
In-Reply-To: <CAEf4BzY+_3vjtN3dJjU4deVR131=Dz-9adYQ+mntVqgAOfh4RA@mail.gmail.com>

On Thu, Feb 17, 2022 at 01:55:13PM -0800, Andrii Nakryiko wrote:
> On Thu, Feb 17, 2022 at 5:19 AM Jiri Olsa <jolsa@kernel.org> wrote:
> >
> > hi,
> > the original patchset [1] removed the whole perf functionality
> > with the hope nobody's using that. But it turned out there's
> > actually bpf script using prologue functionality, so there
> > might be users of this.
> >
> > This patchset gets rid of and adds workaround (and keeps the
> > current functionality) for following deprecated libbpf
> > functions/struct:
> >
> >   bpf_program__set_priv
> >   bpf_program__priv
> >   bpf_map__set_priv
> >   bpf_map__priv
> >   bpf_program__set_prep
> >   bpf_program__nth_fd
> >   struct bpf_prog_prep_result
> >
> > Basically it implements workarounds suggested by Andrii in [2].
> >
> > I tested with script from examples/bpf that are working for me:
> >
> >   examples/bpf/hello.c
> >   examples/bpf/5sec.c
> >
> > The rest seem to fail for various reasons even without this
> > change..  they seem unmaintained for some time now, but I might
> > have wrong setup.
> >
> > Also available in here:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> >   perf/depre
> >
> > thanks,
> > jirka
> >
> >
> > [1] https://lore.kernel.org/linux-perf-users/YgoPxhE3OEEmZqla@krava/T/#t
> > [2] https://lore.kernel.org/linux-perf-users/YgoPxhE3OEEmZqla@krava/T/#md3ccab9fe70a4583e94603b1a562e369bd67b17d
> > ---
> > Jiri Olsa (3):
> >       perf tools: Remove bpf_program__set_priv/bpf_program__priv usage
> >       perf tools: Remove bpf_map__set_priv/bpf_map__priv usage
> >       perf tools: Rework prologue generation code
> >
> 
> It's great that you are deprecating these, thanks a lot for that! I
> suggest to also doing libbpf_set_strict_mode(LIBBPF_STRICT_ALL) to

will check

> check that libbpf 1.0 won't break anything. For example, you'll need
> to use a custom SEC() handler to handle those quirky sections that
> perf allows. This patch set has landed in bpf-next, so you should be
> good to go.

ah ok it already got merged.. I'll add it in new version

thanks,
jirka

> 
> 
> >  tools/perf/util/bpf-loader.c | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
> >  1 file changed, 230 insertions(+), 37 deletions(-)

      reply	other threads:[~2022-02-18  9:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 13:19 [PATCHv2 0/3] perf/bpf: Replace deprecated code Jiri Olsa
2022-02-17 13:19 ` [PATCH 1/3] perf tools: Remove bpf_program__set_priv/bpf_program__priv usage Jiri Olsa
2022-02-17 21:47   ` Andrii Nakryiko
2022-02-18  9:01     ` Jiri Olsa
2022-02-17 13:19 ` [PATCH 2/3] perf tools: Remove bpf_map__set_priv/bpf_map__priv usage Jiri Olsa
2022-02-17 21:49   ` Andrii Nakryiko
2022-02-18  9:01     ` Jiri Olsa
2022-02-17 13:19 ` [PATCH 3/3] perf tools: Rework prologue generation code Jiri Olsa
2022-02-17 21:53   ` Andrii Nakryiko
2022-02-18  9:01     ` Jiri Olsa
2022-02-18 13:03       ` Jiri Olsa
2022-02-18 14:22         ` Jiri Olsa
2022-02-18 19:55       ` Andrii Nakryiko
2022-02-20 13:44         ` Jiri Olsa
     [not found]           ` <aa29a73b-b40d-6adf-2252-308917603f05@fb.com>
2022-02-20 23:10             ` Jiri Olsa
2022-02-23 22:29           ` Andrii Nakryiko
2022-02-25 12:14             ` Jiri Olsa
2022-02-25 14:32               ` Arnaldo Carvalho de Melo
2022-02-17 21:55 ` [PATCHv2 0/3] perf/bpf: Replace deprecated code Andrii Nakryiko
2022-02-18  9:01   ` 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=Yg9ghL33UYyh3es4@krava \
    --to=olsajiri@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@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.