summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-bench.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2023-03-31 22:29:44 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-04-04 18:23:58 +0200
commitf6a7bbbfe61cc34c4e443141d3eb110a80473d8c (patch)
treef11417754cd2dff04155dd790c8262d6cb072ac9 /tools/perf/builtin-bench.c
parentperf pmu: Add perf_pmu__destroy() function (diff)
downloadlinux-f6a7bbbfe61cc34c4e443141d3eb110a80473d8c.tar.xz
linux-f6a7bbbfe61cc34c4e443141d3eb110a80473d8c.zip
perf bench: Add pmu-scan benchmark
The pmu-scan benchmark will repeatedly scan the sysfs to get the available PMU information. $ ./perf bench internals pmu-scan # Running 'internals/pmu-scan' benchmark: Computing performance of sysfs PMU event scan for 100 times Average PMU scanning took: 6850.990 usec (+- 48.445 usec) Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-bench.c')
-rw-r--r--tools/perf/builtin-bench.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index d0fcc3cdc185..58f1cfe1eb34 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -92,6 +92,7 @@ static struct bench internals_benchmarks[] = {
{ "kallsyms-parse", "Benchmark kallsyms parsing", bench_kallsyms_parse },
{ "inject-build-id", "Benchmark build-id injection", bench_inject_build_id },
{ "evlist-open-close", "Benchmark evlist open and close", bench_evlist_open_close },
+ { "pmu-scan", "Benchmark sysfs PMU info scanning", bench_pmu_scan },
{ NULL, NULL, NULL }
};