summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-lock.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <davidlohr@hp.com>2013-09-08 19:19:18 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-10-09 11:23:54 -0300
commit60a25cbc4a167fc0129296c3c640d8506a57acc5 (patch)
treea368a8d138c7fbd2e5e367203fe51669b83fca07 /tools/perf/builtin-lock.c
parent375eb2be5584b8182a917124ca217b74e43d2dc4 (diff)
downloadlinux-60a25cbc4a167fc0129296c3c640d8506a57acc5.tar.gz
linux-60a25cbc4a167fc0129296c3c640d8506a57acc5.tar.bz2
linux-60a25cbc4a167fc0129296c3c640d8506a57acc5.zip
perf lock: Limit bad rate precision
Two decimal precision should be enough for this. Signed-off-by: Davidlohr Bueso <davidlohr@hp.com> Cc: Aswin Chandramouleeswaran <aswin@hp.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1378693159-8747-7-git-send-email-davidlohr@hp.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-lock.c')
-rw-r--r--tools/perf/builtin-lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 780484fb59a0..972310cbeb63 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -686,7 +686,7 @@ static void print_bad_events(int bad, int total)
pr_info("\n=== output for debug===\n\n");
pr_info("bad: %d, total: %d\n", bad, total);
- pr_info("bad rate: %f %%\n", (double)bad / (double)total * 100);
+ pr_info("bad rate: %.2f %%\n", (double)bad / (double)total * 100);
pr_info("histogram of events caused bad sequence\n");
for (i = 0; i < BROKEN_MAX; i++)
pr_info(" %10s: %d\n", name[i], bad_hist[i]);