perf stat: Add branch performance metric
authorAnton Blanchard <anton@samba.org>
Sun, 18 Oct 2009 11:29:23 +0000 (22:29 +1100)
committerIngo Molnar <mingo@elte.hu>
Mon, 19 Oct 2009 07:20:21 +0000 (09:20 +0200)
commit11018201b831e19304c0d639f105ad6c27e120b1
tree531051de316cdf54b8193d11fb843d7432419d2c
parentf39cdf25bf77219676ec5360980ac40b1a7e144a
perf stat: Add branch performance metric

When we count both branches and branch-misses it is useful to
print out the percentage of branch-misses:

 # perf stat -e branches -e branch-misses /bin/true

 Performance counter stats for '/bin/true':

         401684  branches                 #      0.000 M/sec
          23301  branch-misses            #      5.801 %

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: paulus@samba.org
Cc: a.p.zijlstra@chello.nl
LKML-Reference: <20091018112923.GQ4808@kryten>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-stat.c