aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-02-04 02:56:54 -0500
committerIngo Molnar <mingo@kernel.org>2016-02-04 02:56:54 -0500
commit580df49eed6639263348af3ff60941ff14aa72c0 (patch)
tree57f0a1eafd02442183a938e59faab9fc6902d91b /tools
parent9a969403c34ffcc4c92118616665ae1c7eb5a650 (diff)
parent51fd2df1e882a3c2a3f4b6c9ff243a93c9046dba (diff)
Merge tag 'perf-urgent-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Fix 'perf stat' interval output values (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/stat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 2b58edccd56f..afb0c45eba34 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -311,6 +311,16 @@ int perf_stat_process_counter(struct perf_stat_config *config,
311 311
312 aggr->val = aggr->ena = aggr->run = 0; 312 aggr->val = aggr->ena = aggr->run = 0;
313 313
314 /*
315 * We calculate counter's data every interval,
316 * and the display code shows ps->res_stats
317 * avg value. We need to zero the stats for
318 * interval mode, otherwise overall avg running
319 * averages will be shown for each interval.
320 */
321 if (config->interval)
322 init_stats(ps->res_stats);
323
314 if (counter->per_pkg) 324 if (counter->per_pkg)
315 zero_per_pkg(counter); 325 zero_per_pkg(counter);
316 326