perf stat: Introduce read_counters function
authorJiri Olsa <jolsa@kernel.org>
Fri, 26 Jun 2015 09:29:19 +0000 (11:29 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Jun 2015 14:48:02 +0000 (11:48 -0300)
commit106a94a0f8c207ef4113ce7e32f34a00b3b174e7
tree09c5dab8445fb634fb56e8a29040e6cef8a37071
parentf99f4719b841a9745d6a7652eef3956aaf2db66a
perf stat: Introduce read_counters function

Moving read counters logic into single read_counters function, which
will be called for both interval and overall processing legs.

The reason is to split reading and processing (following patches)
counters code, so we could read counters from other sources (like
perf.data) and process them in the same way as 'perf stat' command does.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1435310967-14570-15-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-stat.c