From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Dmitry Dolgov <9erthalion6@gmail.com>, Song Liu <song@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
Song Liu <songliubraving@fb.com>,
linux-perf-users@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
mingo@redhat.com, jolsa@kernel.org, irogers@google.com
Subject: Re: [RFC PATCH] perf stat: Separate bperf from bpf_profiler
Date: Fri, 5 May 2023 17:32:15 -0300 [thread overview]
Message-ID: <ZFVnz1oJxXb7MSDY@kernel.org> (raw)
In-Reply-To: <CAPhsuW5e+2rjnbEsXXXuBO2bUvyx0mHquxb6a0a6MGqXdaodUw@mail.gmail.com>
Em Thu, May 04, 2023 at 07:01:04PM -0700, Song Liu escreveu:
> On Fri, Apr 28, 2023 at 6:44 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Em Fri, Apr 21, 2023 at 10:56:10PM +0200, Dmitry Dolgov escreveu:
> > > > On Wed, Apr 12, 2023 at 08:23:16PM +0200, Dmitrii Dolgov wrote:
> > > > It seems that perf stat -b <prog id> doesn't produce any results:
> > > > $ perf stat -e cycles -b 4 -I 10000 -vvv
> > > > Control descriptor is not initialized
> > > > cycles: 0 0 0
> > > > time counts unit events
> > > > 10.007641640 <not supported> cycles
> > > > Looks like this happens because fentry/fexit progs are getting loaded, but the
> > > > corresponding perf event is not enabled and not added into the events bpf map.
> > > > I think there is some mixing up between two type of bpf support, one for bperf
> > > > and one for bpf_profiler. Both are identified via evsel__is_bpf, based on which
> > > > perf events are enabled, but for the latter (bpf_profiler) a perf event is
> > > > required. Using evsel__is_bperf to check only bperf produces expected results:
> > > Any thoughts on this? I would appreciate clarifications if I'm missing
> > > something.
> > Namhyung, Song, can you please take a look at this?
> Sorry for the late response. The fix looks good to me and worked well
> in my test.
> Reviewed-and-tested-by: Song Liu <song@kernel.org>
> I guess we also need:
> Fixes: 112cb56164bc2 ("perf stat: Introduce config stat.bpf-counter-events")
Thanks a lot, applied, and this is relevant in the current situation,
where we're trying to have Linux v6.4 perf tools building BPF skels by
default.
- Arnaldo
prev parent reply other threads:[~2023-05-05 20:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 18:23 [RFC PATCH] perf stat: Separate bperf from bpf_profiler Dmitrii Dolgov
2023-04-21 20:56 ` Dmitry Dolgov
2023-04-29 1:44 ` Arnaldo Carvalho de Melo
2023-05-05 2:01 ` Song Liu
2023-05-05 20:32 ` Arnaldo Carvalho de Melo [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=ZFVnz1oJxXb7MSDY@kernel.org \
--to=acme@kernel.org \
--cc=9erthalion6@gmail.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=song@kernel.org \
--cc=songliubraving@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).