aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorJin Yao <[email protected]>2017-12-05 14:03:05 +0000
committerArnaldo Carvalho de Melo <[email protected]>2017-12-27 15:15:44 +0000
commite0128b30dbfb2884530251b4accdffdbf55a6b72 (patch)
tree7eaeb043e5bb29a0d937761e3f15533e7fbdc64f /tools/perf/builtin-script.c
parentperf stat: Update per-thread shadow stats (diff)
downloadkernel-e0128b30dbfb2884530251b4accdffdbf55a6b72.tar.gz
kernel-e0128b30dbfb2884530251b4accdffdbf55a6b72.zip
perf stat: Print per-thread shadow stats
The function perf_stat__print_shadow_stats() is called to print the shadow stats on a set of static variables. But the static variables are the limitations to support per-thread shadow stats. This patch lets the perf_stat__print_shadow_stats() support to print the shadow stats from a input parameter 'st'. It will not directly get value from static variable. Instead, it now uses runtime_stat_avg() and runtime_stat_n() to get and compute the values. Signed-off-by: Jin Yao <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Kan Liang <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] [ Rename 'stat' variables to 'st' to build on centos:{5,6} and others where it shadows a global declaration ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r--tools/perf/builtin-script.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 81b395040298..fac6f053e4da 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1557,7 +1557,8 @@ static void perf_sample__fprint_metric(struct perf_script *script,
evsel_script(ev2)->val,
sample->cpu,
&ctx,
- NULL);
+ NULL,
+ &rt_stat);
}
evsel_script(evsel->leader)->gnum = 0;
}