perf stat: Skip evlist__[enable|disable] when all events uses BPF
authorSong Liu <song@kernel.org>
Wed, 12 May 2021 06:51:16 +0000 (23:51 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 21 May 2021 19:50:17 +0000 (16:50 -0300)
commitf8b61bd20479c094fb421da42fef6b4ff22a589e
treee9ab717c6bd7d0d6467dea7ce37d8ef5e07d65a2
parentf42907e8a4515635615a6ffd44242454ef843c04
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>
tools/perf/builtin-stat.c
tools/perf/util/evlist.c