perf evsel: Add read_counter()
authorJiri Olsa <jolsa@kernel.org>
Wed, 26 Jul 2017 12:02:05 +0000 (14:02 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Jul 2017 17:21:59 +0000 (14:21 -0300)
commitf7794d525447f1e4e4b2228dd29dba084005e6bf
tree30ebccbdc677b6f20c29e94fe169fe6ef72dff4c
parentde63403bfd14ae8d613f30c9a0d415581b4cb37e
perf evsel: Add read_counter()

Add perf_evsel__read_counter() to read single or group counter. After
calling this function the counter's evsel::counts struct is filled with
values for the counter and member of its group if there are any.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20170726120206.9099-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/stat.c
tools/perf/util/stat.h