Skip to content

Commit 6744c0b

Browse files
captain5050namhyung
authored andcommitted
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: 2cc7aa9 ("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>
1 parent b582615 commit 6744c0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/builtin-stat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
923923
goto err_out;
924924
}
925925
}
926-
if (!has_supported_counters) {
926+
if (!has_supported_counters && !stat_config.null_run) {
927927
evsel__open_strerror(evlist__first(evsel_list), &target, open_err,
928928
msg, sizeof(msg));
929929
ui__error("No supported events found.\n%s\n", msg);

0 commit comments

Comments
 (0)