All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	"linux-perf-use." <linux-perf-users@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Ian Rogers <irogers@google.com>
Subject: Re: [PATCHv4 bpf-next 0/2] perf tools: Fix prologue generation
Date: Fri, 10 Jun 2022 15:38:35 -0300	[thread overview]
Message-ID: <YqOPq3g7lwtGefRn@kernel.org> (raw)
In-Reply-To: <YqOOsL8EbbO3lhmC@kernel.org>

Em Fri, Jun 10, 2022 at 03:34:24PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Jun 09, 2022 at 01:31:52PM -0700, Andrii Nakryiko escreveu:
> > On Fri, Jun 3, 2022 at 1:45 PM Jiri Olsa <jolsa@kernel.org> wrote:
> > >
> > > hi,
> > > sending change we discussed some time ago [1] to get rid of
> > > some deprecated functions we use in perf prologue code.
> > >
> > > Despite the gloomy discussion I think the final code does
> > > not look that bad ;-)
> > >
> > > This patchset removes following libbpf functions from perf:
> > >   bpf_program__set_prep
> > >   bpf_program__nth_fd
> > >   struct bpf_prog_prep_result
> > >
> > > v4 changes:
> > >   - fix typo [Andrii]
> > >
> > > v3 changes:
> > >   - removed R0/R1 zero init in libbpf_prog_prepare_load_fn,
> > >     because it's not needed [Andrii]
> > >   - rebased/post on top of bpf-next/master which now has
> > >     all the needed perf/core changes
> > >
> > > v2 changes:
> > >   - use fallback section prog handler, so we don't need to
> > >     use section prefix [Andrii]
> > >   - realloc prog->insns array in bpf_program__set_insns [Andrii]
> > >   - squash patch 1 from previous version with
> > >     bpf_program__set_insns change [Daniel]
> > >   - patch 3 already merged [Arnaldo]
> > >   - added more comments
> > >
> > > thanks,
> > > jirka
> > >
> > 
> > Arnaldo, can I get an ack from you for this patch set? Thank you!
> 
> So, before these patches:
> 
> [acme@quaco perf-urgent]$ git log --oneline -5
> 22905f78d181f446 (HEAD) libperf evsel: Open shouldn't leak fd on failure
> a3c6da3dbd4bdf9c perf test: Fix "perf stat CSV output linter" test on s390
> 785cb9e85e8ba66f perf unwind: Fix uninitialized variable
> 874c8ca1e60b2c56 netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context
> 3d9f55c57bc3659f Merge tag 'fs_for_v5.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
> [acme@quaco perf-urgent]$ sudo su -
> [root@quaco ~]# perf -v
> perf version 5.19.rc1.g22905f78d181
> [root@quaco ~]# perf test 42
>  42: BPF filter                                                      :
>  42.1: Basic BPF filtering                                           : Ok
>  42.2: BPF pinning                                                   : Ok
>  42.3: BPF prologue generation                                       : Ok
> [root@quaco ~]#
> 
> And after:
> 
> [acme@quaco perf-urgent]$ git log --oneline -5
> f8ec656242acf2de (HEAD -> perf/urgent) perf tools: Rework prologue generation code
> a750a8dd7e5d2d4b perf tools: Register fallback libbpf section handler
> d28f2a8ad42af160 libperf evsel: Open shouldn't leak fd on failure
> a3c6da3dbd4bdf9c perf test: Fix "perf stat CSV output linter" test on s390
> 785cb9e85e8ba66f perf unwind: Fix uninitialized variable
> [acme@quaco perf-urgent]$ sudo su -
> [root@quaco ~]# perf -v
> perf version 5.19.rc1.gf8ec656242ac
> [root@quaco ~]# perf test 42
>  42: BPF filter                                                      :
>  42.1: Basic BPF filtering                                           : FAILED!
>  42.2: BPF pinning                                                   : FAILED!
>  42.3: BPF prologue generation                                       : Ok
> [root@quaco ~]# 
> 
> Jiri, can you try reproducing these? Do this require some other work
> that is in bpf-next/master? Lemme try...

No:

[acme@quaco perf-urgent]$ git log --oneline -5
d324948b907b292e (HEAD -> bpf-next-master) perf tools: Rework prologue generation code
911fc51320e09283 perf tools: Register fallback libbpf section handler
fe92833524e368e5 (bpf-next/master, bpf-next/for-next) libbpf: Fix uprobe symbol file offset calculation logic
492f99e4190a4574 bpf, docs: Fix typo "BFP_ALU" to "BPF_ALU"
0b817059a8830b8b bpftool: Fix bootstrapping during a cross compilation
[acme@quaco perf-urgent]$ sudo su -
[root@quaco ~]# perf -v
perf version 5.18.gd324948b907b
[root@quaco ~]# perf test 42
 42: BPF filter                                                      :
 42.1: Basic BPF filtering                                           : FAILED!
 42.2: BPF pinning                                                   : FAILED!
 42.3: BPF prologue generation                                       : Ok
[root@quaco ~]#

Removing these two patches:

[acme@quaco perf-urgent]$ git log --oneline -5
fe92833524e368e5 (HEAD -> bpf-next-master, bpf-next/master, bpf-next/for-next) libbpf: Fix uprobe symbol file offset calculation logic
492f99e4190a4574 bpf, docs: Fix typo "BFP_ALU" to "BPF_ALU"
0b817059a8830b8b bpftool: Fix bootstrapping during a cross compilation
d352bd889b6a9c97 Merge branch 'bpf: Add 64bit enum value support'
61dbd5982964074f docs/bpf: Update documentation for BTF_KIND_ENUM64 support
[acme@quaco perf-urgent]$ sudo su -
[root@quaco ~]# perf -v
perf version 5.18.gfe92833524e3
[root@quaco ~]# perf test 42
 42: BPF filter                                                      :
 42.1: Basic BPF filtering                                           : Ok
 42.2: BPF pinning                                                   : Ok
 42.3: BPF prologue generation                                       : Ok
[root@quaco ~]# 

- Arnaldo

  reply	other threads:[~2022-06-10 18:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 20:45 [PATCHv4 bpf-next 0/2] perf tools: Fix prologue generation Jiri Olsa
2022-06-03 20:45 ` [PATCHv4 bpf-next 1/2] perf tools: Register fallback libbpf section handler Jiri Olsa
2022-06-03 20:45 ` [PATCHv4 bpf-next 2/2] perf tools: Rework prologue generation code Jiri Olsa
2022-06-09 20:31 ` [PATCHv4 bpf-next 0/2] perf tools: Fix prologue generation Andrii Nakryiko
2022-06-10 18:34   ` Arnaldo Carvalho de Melo
2022-06-10 18:38     ` Arnaldo Carvalho de Melo [this message]
2022-06-10 18:45     ` Andrii Nakryiko
2022-06-10 20:53       ` Jiri Olsa
2022-06-12 16:25         ` Jiri Olsa
2022-06-13 20:15           ` Arnaldo Carvalho de Melo
2022-06-15 15:27           ` Arnaldo Carvalho de Melo
2022-06-15 19:36             ` Jiri Olsa
2022-06-15 22:12               ` Jiri Olsa

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=YqOPq3g7lwtGefRn@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=irogers@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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.