diff options
author | 2021-04-25 14:43:33 -0700 | |
---|---|---|
committer | 2021-04-29 10:30:58 -0300 | |
commit | 5508c9dae2a4a111acc7472900164f556ae75346 (patch) | |
tree | fd1feda22a604bcc179794b2acf320ad7c66d97b /tools/perf/util/python.c | |
parent | perf stat: Introduce ':b' modifier (diff) | |
download | linux-5508c9dae2a4a111acc7472900164f556ae75346.tar.gz linux-5508c9dae2a4a111acc7472900164f556ae75346.tar.bz2 linux-5508c9dae2a4a111acc7472900164f556ae75346.zip |
perf stat: Introduce bpf_counter_ops->disable()
Introduce bpf_counter_ops->disable(), which is used stop counting the
event.
Committer notes:
Added a dummy bpf_counter__disable() to the python binding to avoid
having 'perf test python' failing.
bpf_counter isn't supported in the python binding.
Signed-off-by: Song Liu <song@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: kernel-team@fb.com
Link: https://lore.kernel.org/r/20210425214333.1090950-6-song@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/python.c')
-rw-r--r-- | tools/perf/util/python.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 278abecb5bdf..412f8e79e409 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -90,6 +90,7 @@ int metricgroup__copy_metric_events(struct evlist *evlist, struct cgroup *cgrp, */ void bpf_counter__destroy(struct evsel *evsel); int bpf_counter__install_pe(struct evsel *evsel, int cpu, int fd); +int bpf_counter__disable(struct evsel *evsel); void bpf_counter__destroy(struct evsel *evsel __maybe_unused) { @@ -100,6 +101,11 @@ int bpf_counter__install_pe(struct evsel *evsel __maybe_unused, int cpu __maybe_ return 0; } +int bpf_counter__disable(struct evsel *evsel __maybe_unused) +{ + return 0; +} + /* * Support debug printing even though util/debug.c is not linked. That means * implementing 'verbose' and 'eprintf'. |