Skip to contentSkip to conversation

perf stat: Use percentages for scaling output

tip:perfcounters/urgent tip-bot for Ingo Molnar 1 participant 1 message Jun 29, 2009 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  210ad39fb7ef0bc0494483f517f42524f16bb2a7
Gitweb:     http://git.kernel.org/tip/210ad39fb7ef0bc0494483f517f42524f16bb2a7
Author:     Ingo Molnar <[email protected]>
AuthorDate: Mon, 29 Jun 2009 21:50:54 +0200
Committer:  Ingo Molnar <[email protected]>
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.

Cc Jaswinder Singh Rajput <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>

LKML-Reference: <new-submission>

---
 tools/perf/builtin-stat.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
tools/perf/builtin-stat.c +2 -1
index 3e5ea4e..c5a2907 100644
@@ -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");
 }