perf stat: Use percentages for scaling output
authorIngo Molnar <mingo@elte.hu>
Mon, 29 Jun 2009 19:50:54 +0000 (21:50 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 29 Jun 2009 19:50:54 +0000 (21:50 +0200)
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

index 3e5ea4e2e5fd989d882bf57bd525d9a53c411d1d..c5a290727a92f8b529e8fc81a28455f2c77ac386 100644 (file)
@@ -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");
 }