perf stat: Add more cache-miss percentage printouts
authorIngo Molnar <mingo@elte.hu>
Thu, 19 May 2011 12:01:42 +0000 (14:01 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 19 May 2011 12:30:50 +0000 (14:30 +0200)
commitc3305257cd4df63e03e21e331a0140ae9c0faccc
treed5b9609bf96f004a9efe0aca326983489718751e
parent2cba3ffb9a9db3874304a1739002d053d53c738b
perf stat: Add more cache-miss percentage printouts

Print out the cache-miss percentage as well if the cache refs were
collected, for all the generic cache event types.

Before:

   11,103,723,230 dTLB-loads                #  622.471 M/sec                    ( +-  0.30% )
       87,065,337 dTLB-load-misses          #    4.881 M/sec                    ( +-  0.90% )

After:

   11,353,713,242 dTLB-loads                #  626.020 M/sec                    ( +-  0.35% )
      113,393,472 dTLB-load-misses          #    1.00% of all dTLB cache hits   ( +-  0.49% )

Also ASCII color highlight too high percentages, them when it's executed on the console.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-lkhwxsevdbd9a8nymx0vxc3y@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-stat.c