perf stat: Factor our shadow stats
authorIngo Molnar <mingo@elte.hu>
Wed, 27 Apr 2011 02:36:37 +0000 (04:36 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 26 Apr 2011 18:04:56 +0000 (20:04 +0200)
commitdcd9936a5a6d89512b5323c1145647f2dbe0236f
tree5ad83bc4f2a61e5ff65d4d0950cee6a36b65696d
parent749141d926faf23ef811686a8050e7cf13dc223f
perf stat: Factor our shadow stats

Create update_shadow_stats() which is then used in both read_counter_aggr()
and read_counter().

This not only simplifies the code but also fixes a bug: HW_CACHE_REFERENCES
was not updated in read_counter().

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-9uc55z3g88r47exde7zxjm6p@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-stat.c