diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-02-04 10:56:54 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-02-04 10:56:54 +0300 |
commit | 580df49eed6639263348af3ff60941ff14aa72c0 (patch) | |
tree | 57f0a1eafd02442183a938e59faab9fc6902d91b /tools | |
parent | 9a969403c34ffcc4c92118616665ae1c7eb5a650 (diff) | |
parent | 51fd2df1e882a3c2a3f4b6c9ff243a93c9046dba (diff) | |
download | linux-580df49eed6639263348af3ff60941ff14aa72c0.tar.xz |
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.c | 10 |
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, 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); |