summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2017-08-31 21:40:36 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-09-13 14:49:14 +0200
commitb90f1333ef08d2a497ae239798868b046f4e3a97 (patch)
tree3c2914d81f1ce278224f136573ac24ce4fd42f9e
parentperf stat: Hide internal duration_time counter (diff)
downloadlinux-b90f1333ef08d2a497ae239798868b046f4e3a97.tar.xz
linux-b90f1333ef08d2a497ae239798868b046f4e3a97.zip
perf stat: Update walltime_nsecs_stats in interval mode
Some metrics (like GFLOPs) need walltime_nsecs_stats for each interval. Compute it for each interval instead of only at the end. Pointed out by Jiri. Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/20170831194036.30146-12-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/builtin-stat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 855890e0b70b..88f1d5fbdb48 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -415,6 +415,8 @@ static void process_interval(void)
pr_err("failed to write stat round event\n");
}
+ init_stats(&walltime_nsecs_stats);
+ update_stats(&walltime_nsecs_stats, stat_config.interval * 1000000);
print_counters(&rs, 0, NULL);
}