aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul A. Clarke <[email protected]>2020-05-07 09:18:07 -0500
committerArnaldo Carvalho de Melo <[email protected]>2020-05-28 10:03:25 -0300
commitd4d5ca0baac3de82c00ebc7677ee84537c31ba3c (patch)
treec68f280942bf1d2e582e2baaf1c76a3928cdf4ec
parent9be27a5d416925aef4ff816379c31b8cd18ff55d (diff)
perf stat: Increase perf metric output resolution
Add another digit of precision to the perf metrics output. Before: $ /usr/bin/perf stat --metrics run_cpi /bin/ls [...] 4,345,526 pm_run_cyc # 1.1 run_cpi 3,818,069 pm_run_inst_cmpl [...] $ /usr/bin/perf stat --metrics run_cpi --metric-only /bin/ls [...] run_cpi 1.1 [...] After: $ perf stat --metrics run_cpi /bin/ls [...] 4,280,882 pm_run_cyc # 1.12 run_cpi 3,817,016 pm_run_inst_cmpl [...] $ perf stat --metrics run_cpi --metric-only /bin/ls [...] run_cpi 1.06 [...] Cc: Andi Kleen <[email protected]> Cc: Jin Yao <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Namhyung Kim <[email protected]> Signed-off-by: Paul Clarke <[email protected]> LPU-Reference: [email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/stat-shadow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index 129b8c5f2538..9bd7a8d2a858 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -797,7 +797,7 @@ static void generic_metric(struct perf_stat_config *config,
print_metric(config, ctxp, NULL, "%8.1f",
metric_bf, ratio);
} else {
- print_metric(config, ctxp, NULL, "%8.1f",
+ print_metric(config, ctxp, NULL, "%8.2f",
metric_name ?
metric_name :
out->force_header ? name : "",