On Fri, Apr 17, 2020 at 08:51:54AM +0800, Jin Yao wrote:
SNIP
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index ec053dc1e35c..d5c326ff46d0 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -359,6 +359,7 @@ static void process_interval(void)
clock_gettime(CLOCK_MONOTONIC, &ts);
diff_timespec(&rs, &ts, &ref_time);
+ perf_stat__reset_rt_stat();
could you use just existing:
perf_stat__reset_shadow_per_stat(&rt_stat)
or perhaps event perf_stat__reset_shadow_stats, given
that we init walltime_nsecs_stats just few lines below
jirka
read_counters(&rs);
if (STAT_RECORD) {
SNIP