diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 5f26137b8d6028fa0fc00e772ebacf43ba3e007e..242476eb808c31ffa35bd79c6b9169a9174b8403 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -368,8 +368,10 @@ int perf_stat_process_counter(struct perf_stat_config *config, * interval mode, otherwise overall avg running * averages will be shown for each interval. */ - if (config->interval) - init_stats(ps->res_stats); + if (config->interval) { + for (i = 0; i < 3; i++) + init_stats(&ps->res_stats[i]); + } if (counter->per_pkg) zero_per_pkg(counter);