lkml.org 
[lkml]   [2009]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:perfcounters/urgent] perf stat: Use percentages for scaling output
Commit-ID:  210ad39fb7ef0bc0494483f517f42524f16bb2a7
Gitweb: http://git.kernel.org/tip/210ad39fb7ef0bc0494483f517f42524f16bb2a7
Author: Ingo Molnar <mingo@elte.hu>
AuthorDate: Mon, 29 Jun 2009 21:50:54 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 29 Jun 2009 21:50:54 +0200

perf stat: Use percentages for scaling output

Peter expressed a strong preference for percentage based
display of scaled values - so revert to that from the
recently introduced multiplication-factor unit.

Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
tools/perf/builtin-stat.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 3e5ea4e..c5a2907 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -307,7 +307,8 @@ static void print_counter(int counter)
abs_printout(counter, count, noise);

if (scaled)
- fprintf(stderr, " (%7.2fx scaled)", (double)count[1]/count[2]);
+ fprintf(stderr, " (scaled from %.2f%%)",
+ (double) count[2] / count[1] * 100);

fprintf(stderr, "\n");
}

\
 
 \ /
  Last update: 2009-06-29 21:59    [W:0.033 / U:13.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site