summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r--tools/perf/builtin-stat.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 4c492ac3ac07..f4129a5fbb01 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1372,8 +1372,13 @@ static void print_aggr_thread(struct perf_evsel *counter, char *prefix)
fprintf(output, "%s", prefix);
uval = val * counter->scale;
- printout(thread, 0, counter, uval, prefix, run, ena, 1.0,
- &rt_stat);
+
+ if (stat_config.stats)
+ printout(thread, 0, counter, uval, prefix, run, ena,
+ 1.0, &stat_config.stats[thread]);
+ else
+ printout(thread, 0, counter, uval, prefix, run, ena,
+ 1.0, &rt_stat);
fputc('\n', output);
}
}