diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 3f98689dd68782ac10d4a11d3dc157caed8bc355..60baa3dadc4b692e007dc145c7e784565e55aeab 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -955,10 +955,10 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx) * Enable counters and exec the command: */ if (forks) { - evlist__start_workload(evsel_list); err = enable_counters(); if (err) return -1; + evlist__start_workload(evsel_list); t0 = rdclock(); clock_gettime(CLOCK_MONOTONIC, &ref_time);