* Re: [RFC PATCH] perf stat: Separate bperf from bpf_profiler [not found] ` <20230421205610.xawzzfy36iskcoyx@erthalion.local> @ 2023-04-29 1:44 ` Arnaldo Carvalho de Melo 2023-05-05 2:01 ` Song Liu 0 siblings, 1 reply; 3+ messages in thread From: Arnaldo Carvalho de Melo @ 2023-04-29 1:44 UTC (permalink / raw) To: Namhyung Kim, Song Liu Cc: Dmitry Dolgov, linux-perf-users, Linux Kernel Mailing List, mingo, jolsa, namhyung, irogers 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? - Arnaldo ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] perf stat: Separate bperf from bpf_profiler 2023-04-29 1:44 ` [RFC PATCH] perf stat: Separate bperf from bpf_profiler Arnaldo Carvalho de Melo @ 2023-05-05 2:01 ` Song Liu 2023-05-05 20:32 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 3+ messages in thread From: Song Liu @ 2023-05-05 2:01 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Namhyung Kim, Song Liu, Dmitry Dolgov, linux-perf-users, Linux Kernel Mailing List, mingo, jolsa, irogers 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 for the fix! Song ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] perf stat: Separate bperf from bpf_profiler 2023-05-05 2:01 ` Song Liu @ 2023-05-05 20:32 ` Arnaldo Carvalho de Melo 0 siblings, 0 replies; 3+ messages in thread From: Arnaldo Carvalho de Melo @ 2023-05-05 20:32 UTC (permalink / raw) To: Dmitry Dolgov, Song Liu Cc: Namhyung Kim, Song Liu, linux-perf-users, Linux Kernel Mailing List, mingo, jolsa, irogers 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-05 20:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230412182316.11628-1-9erthalion6@gmail.com>
[not found] ` <20230421205610.xawzzfy36iskcoyx@erthalion.local>
2023-04-29 1:44 ` [RFC PATCH] perf stat: Separate bperf from bpf_profiler Arnaldo Carvalho de Melo
2023-05-05 2:01 ` Song Liu
2023-05-05 20:32 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox