diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2025-02-26 12:30:39 -0800 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-03-02 09:47:24 -0800 |
| commit | 7788ad59d1d9617792037a83513be5b1dd14150f (patch) | |
| tree | 6cd3ba57755085daa202b32e6a15f3b625a2ecc9 /tools/perf/util/evlist.c | |
| parent | perf test: Fix spelling mistake "sythesizing" -> "synthesizing" (diff) | |
| download | linux-7788ad59d1d9617792037a83513be5b1dd14150f.tar.gz linux-7788ad59d1d9617792037a83513be5b1dd14150f.zip | |
perf tools: Skip BPF sideband event for userspace profiling
The BPF sideband information is tracked using a separate thread and
evlist. But it's only useful for profiling kernel and we can skip it
when users profile their application only.
It seems it already fails to open the sideband event in that case.
Let's remove the noise in the verbose output anyway.
Reviewed-by: Ian Rogers <irogers@google.com>
Acked-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20250226203039.1099131-1-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util/evlist.c')
| -rw-r--r-- | tools/perf/util/evlist.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index f0dd174e2deb..43adf6b3d855 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -2594,3 +2594,17 @@ bool evlist__has_bpf_output(struct evlist *evlist) return false; } + +bool evlist__needs_bpf_sb_event(struct evlist *evlist) +{ + struct evsel *evsel; + + evlist__for_each_entry(evlist, evsel) { + if (evsel__is_dummy_event(evsel)) + continue; + if (!evsel->core.attr.exclude_kernel) + return true; + } + + return false; +} |
