aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorRavi Bangoria <[email protected]>2018-11-16 04:28:43 +0000
committerArnaldo Carvalho de Melo <[email protected]>2018-12-17 17:53:30 +0000
commit57ddf09173c1e7d0511ead8924675c7198e56545 (patch)
treef9a7d101ba10b9823df15459e712f15b049d1cd5 /tools/perf/builtin-script.c
parentperf build: Give better hint about devel package for libssl (diff)
downloadkernel-57ddf09173c1e7d0511ead8924675c7198e56545.tar.gz
kernel-57ddf09173c1e7d0511ead8924675c7198e56545.zip
perf stat: Fix shadow stats for clock events
Commit 0aa802a79469 ("perf stat: Get rid of extra clock display function") introduced scale and unit for clock events. Thus, perf_stat__update_shadow_stats() now saves scaled values of clock events in msecs, instead of original nsecs. But while calculating values of shadow stats we still consider clock event values in nsecs. This results in a wrong shadow stat values. Ex, # ./perf stat -e task-clock,cycles ls <SNIP> 2.60 msec task-clock:u # 0.877 CPUs utilized 2,430,564 cycles:u # 1215282.000 GHz Fix this by saving original nsec values for clock events in perf_stat__update_shadow_stats(). After patch: # ./perf stat -e task-clock,cycles ls <SNIP> 3.14 msec task-clock:u # 0.839 CPUs utilized 3,094,528 cycles:u # 0.985 GHz Suggested-by: Jiri Olsa <[email protected]> Reported-by: Anton Blanchard <[email protected]> Signed-off-by: Ravi Bangoria <[email protected]> Reviewed-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jin Yao <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Thomas Richter <[email protected]> Cc: [email protected] Fixes: 0aa802a79469 ("perf stat: Get rid of extra clock display function") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
0 files changed, 0 insertions, 0 deletions