From: Jiri Olsa <olsajiri@gmail.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Jiri Olsa <olsajiri@gmail.com>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
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: Thu, 16 Jun 2022 00:12:10 +0200 [thread overview]
Message-ID: <YqpZOtkwxB28UbRU@krava> (raw)
In-Reply-To: <Yqo0wMcrUmcZR0f3@krava>
On Wed, Jun 15, 2022 at 09:36:34PM +0200, Jiri Olsa wrote:
> On Wed, Jun 15, 2022 at 12:27:03PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Sun, Jun 12, 2022 at 06:25:09PM +0200, Jiri Olsa escreveu:
> > > so the problem is that we prepend init proglogue instructions
> > > for each program not just for the one that needs it, so it will
> > > mismatch later on.. the fix below makes it work for me
> >
> > > Arnaldo,
> > > I squashed and pushed the change below changes to my bpf/depre
> > > branch, could you please retest?
> >
> > Before:
> >
> > [acme@quaco perf-urgent]$ git log --oneline -5
> > e2cf9d315f90670f (HEAD -> perf/urgent, five/perf/urgent) perf test topology: Use !strncmp(right platform) to fix guest PPC comparision check
> > 42e4fb08ff987b50 perf test: Record only user callchains on the "Check Arm64 callgraphs are complete in fp mode" test
> > 819d5c3cf75d0f95 perf beauty: Update copy of linux/socket.h with the kernel sources
> > ebdc02b3ece8238b perf test: Fix variable length array undefined behavior in bp_account
> > 8ff58c35adb7f118 libperf evsel: Open shouldn't leak fd on failure
> > [acme@quaco perf-urgent]$ sudo su -
> > [root@quaco ~]# perf -v
> > perf version 5.19.rc2.ge2cf9d315f90
> > [root@quaco ~]# perf test bpf
> > 40: LLVM search and compile :
> > 40.1: Basic BPF llvm compile : Ok
> > 40.3: Compile source for BPF prologue generation : Ok
> > 40.4: Compile source for BPF relocation : Ok
> > 42: BPF filter :
> > 42.1: Basic BPF filtering : Ok
> > 42.2: BPF pinning : Ok
> > 42.3: BPF prologue generation : Ok
> > 63: Test libpfm4 support :
> > 96: perf stat --bpf-counters test : Ok
> > [root@quaco ~]#
> >
> > After your first patch:
> >
> > [acme@quaco perf-urgent]$ git log --oneline -5 jolsa/bpf/depre
> > 9317b879db422632 (jolsa/bpf/depre) perf tools: Rework prologue generation code
> > 4d40831f29f2c9ad perf tools: Register fallback libbpf section handler
> > f913ad6559e337b4 libbpf: Fix is_pow_of_2
> > f175ece2e3436748 selftests/bpf: Fix tc_redirect_dtime
> > 7b711e721234f475 bpf, test_run: Remove unnecessary prog type checks
> > [acme@quaco perf-urgent]$ git cherry-pick 4d40831f29f2c9ad
> > [perf/urgent ab39fb6880b57507] perf tools: Register fallback libbpf section handler
> > Author: Jiri Olsa <jolsa@kernel.org>
> > Date: Thu Apr 21 15:22:25 2022 +0200
> > 1 file changed, 65 insertions(+), 11 deletions(-)
> > [acme@quaco perf-urgent]$
> > [acme@quaco perf-urgent]$ alias m='rm -rf ~/libexec/perf-core/ ; perf stat -e cycles:u,instructions:u make -k BUILD_BPF_SKEL=1 PYTHON=python3 O=/tmp/build/perf-urgent -C tools/perf install-bin && perf test python'
> > [acme@quaco perf-urgent]$ rm -rf /tmp/build/perf-urgent ; mkdir -p /tmp/build/perf-urgent ; m
> > <SNIP>
> > 19: 'import perf' in python : Ok
> > [acme@quaco perf-urgent]$
> > [acme@quaco perf-urgent]$ sudo su -
> > [sudo] password for acme:
> > [root@quaco ~]# perf test bpf
> > 40: LLVM search and compile :
> > 40.1: Basic BPF llvm compile : Ok
> > 40.3: Compile source for BPF prologue generation : Ok
> > 40.4: Compile source for BPF relocation : Ok
> > 42: BPF filter :
> > 42.1: Basic BPF filtering : Ok
> > 42.2: BPF pinning : Ok
> > 42.3: BPF prologue generation : FAILED!
> > 63: Test libpfm4 support :
> > 96: perf stat --bpf-counters test : Ok
> > [root@quaco ~]#
> >
> > perf test -v bpf later, lets see if landing the second patch fixes
> > things and this bisection problem is justified:
> >
> > [acme@quaco perf-urgent]$ git log --oneline -5 jolsa/bpf/depre
> > 9317b879db422632 (jolsa/bpf/depre) perf tools: Rework prologue generation code
> > 4d40831f29f2c9ad perf tools: Register fallback libbpf section handler
> > f913ad6559e337b4 libbpf: Fix is_pow_of_2
> > f175ece2e3436748 selftests/bpf: Fix tc_redirect_dtime
> > 7b711e721234f475 bpf, test_run: Remove unnecessary prog type checks
> > [acme@quaco perf-urgent]$ git remote update jolsa
> > Fetching jolsa
> > [acme@quaco perf-urgent]$ git cherry-pick 9317b879db422632
> > [perf/urgent 9a36c7c94e1f596d] perf tools: Rework prologue generation code
> > Author: Jiri Olsa <jolsa@kernel.org>
> > Date: Mon May 9 22:46:20 2022 +0200
> > 1 file changed, 110 insertions(+), 18 deletions(-)
> > [acme@quaco perf-urgent]$
> > [acme@quaco perf-urgent]$ rm -rf /tmp/build/perf-urgent ; mkdir -p /tmp/build/perf-urgent ; m
> > <SNIP>
> > 19: 'import perf' in python : Ok
> > [acme@quaco perf-urgent]$ sudo su -
> > [root@quaco ~]# perf test bpf
> > 40: LLVM search and compile :
> > 40.1: Basic BPF llvm compile : Ok
> > 40.3: Compile source for BPF prologue generation : Ok
> > 40.4: Compile source for BPF relocation : Ok
> > 42: BPF filter :
> > 42.1: Basic BPF filtering : Ok
> > 42.2: BPF pinning : Ok
> > 42.3: BPF prologue generation : Ok
> > 63: Test libpfm4 support :
> > 96: perf stat --bpf-counters test : Ok
> > [root@quaco ~]#
> >
> > So it works in the end, can it be made to work after the first step? I
> > didn't check that.
>
> heya,
> so the first patch is preparation and the last one is the real fix
>
> at the moment it does not work without this change, so I don't
> think it's a problem for the bisect, is it?
ah I just checked that thing worked before :)) ok.. I think the only
way here is to squash them together.. doesn't look that bad
jirka
prev parent reply other threads:[~2022-06-15 22:12 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
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 [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=YqpZOtkwxB28UbRU@krava \
--to=olsajiri@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=arnaldo.melo@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=irogers@google.com \
--cc=john.fastabend@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).