aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-07-26 14:02:05 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-07-26 14:21:59 -0300
commitf7794d525447f1e4e4b2228dd29dba084005e6bf (patch)
tree30ebccbdc677b6f20c29e94fe169fe6ef72dff4c /tools/perf/util/evsel.h
parentperf tools: Add perf_evsel__read_size function (diff)
downloadlinux-dev-f7794d525447f1e4e4b2228dd29dba084005e6bf.tar.xz
linux-dev-f7794d525447f1e4e4b2228dd29dba084005e6bf.zip
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>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/evsel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index fb40ca3c6519..de03c18daaf0 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -299,6 +299,8 @@ static inline bool perf_evsel__match2(struct perf_evsel *e1,
int perf_evsel__read(struct perf_evsel *evsel, int cpu, int thread,
struct perf_counts_values *count);
+int perf_evsel__read_counter(struct perf_evsel *evsel, int cpu, int thread);
+
int __perf_evsel__read_on_cpu(struct perf_evsel *evsel,
int cpu, int thread, bool scale);