diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-02-04 08:57:44 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-02-04 08:57:44 +0100 |
commit | b83ea91f08f648460b08e8980560abdf96060a19 (patch) | |
tree | 1a6db205770ed7103afe0aa1234dec0b1227f380 /tools/perf/util/stat.c | |
parent | 8eb22c984eb9eeaed47130f5679acd367af69678 (diff) | |
parent | 580df49eed6639263348af3ff60941ff14aa72c0 (diff) | |
download | linux-b83ea91f08f648460b08e8980560abdf96060a19.tar.bz2 |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/stat.c')
-rw-r--r-- | tools/perf/util/stat.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index beeed0bd3bee..4d9b481cf3b6 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, aggr->val = aggr->ena = aggr->run = 0; + /* + * We calculate counter's data every interval, + * and the display code shows ps->res_stats + * avg value. We need to zero the stats for + * interval mode, otherwise overall avg running + * averages will be shown for each interval. + */ + if (config->interval) + init_stats(ps->res_stats); + if (counter->per_pkg) zero_per_pkg(counter); |