aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorSong Liu <song@kernel.org>2021-05-11 23:51:16 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-05-21 16:50:17 -0300
commitf8b61bd20479c094fb421da42fef6b4ff22a589e (patch)
treee9ab717c6bd7d0d6467dea7ce37d8ef5e07d65a2 /tools/perf/util
parentperf script: Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit (diff)
downloadlinux-dev-f8b61bd20479c094fb421da42fef6b4ff22a589e.tar.xz
linux-dev-f8b61bd20479c094fb421da42fef6b4ff22a589e.zip
perf stat: Skip evlist__[enable|disable] when all events uses BPF
When all events of a perf-stat session use BPF, it is not necessary to call evlist__enable() and evlist__disable(). Skip them when all_counters_use_bpf is true. Signed-off-by: Song Liu <song@kernel.org> Reported-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/evlist.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 6e5c41528c7d..6ea3e677dc1e 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -425,9 +425,6 @@ static void __evlist__disable(struct evlist *evlist, char *evsel_name)
if (affinity__setup(&affinity) < 0)
return;
- evlist__for_each_entry(evlist, pos)
- bpf_counter__disable(pos);
-
/* Disable 'immediate' events last */
for (imm = 0; imm <= 1; imm++) {
evlist__for_each_cpu(evlist, i, cpu) {