summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2025-12-03 13:47:00 -0800
committerNamhyung Kim <namhyung@kernel.org>2025-12-04 00:36:14 -0800
commit6744c0b182c1f371135bc3f4e62b96ad884c9f89 (patch)
tree2bd1be1682d1e27a54be31c5c574a953b3a3bdf6 /tools
parentb58261584d2f6b5241ac1693026242ef2f2148b4 (diff)
perf stat: Allow no events to open if this is a "--null" run
It is intended that a "--null" run doesn't open any events. Fixes: 2cc7aa995ce9 ("perf stat: Refactor retry/skip/fatal error handling") Tested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Thomas Richter <tmricht@linux.ibm.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 5c06e9b61821..6410115ed9c5 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -923,7 +923,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
goto err_out;
}
}
- if (!has_supported_counters) {
+ if (!has_supported_counters && !stat_config.null_run) {
evsel__open_strerror(evlist__first(evsel_list), &target, open_err,
msg, sizeof(msg));
ui__error("No supported events found.\n%s\n", msg);