diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-11 19:24:23 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-11 19:24:23 -0300 |
commit | 5555ded44698ed82ffa3d8742ec2994f695127bc (patch) | |
tree | 223aabd7b662345fbfc54caeb721c521fbe23968 /tools/perf/util/evsel.h | |
parent | 0e9b07e574e544c1e840c59dabf39fef120620ae (diff) | |
download | lwn-5555ded44698ed82ffa3d8742ec2994f695127bc.tar.gz lwn-5555ded44698ed82ffa3d8742ec2994f695127bc.zip |
perf evsel: Introduce perf_evsel__{str,int}val methods
Wrappers to the libtraceevent routines, so that we can further reduce
the surface contact perf builtins have with it.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-rtmgzptvrifzjxqwb9vs6g1b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r-- | tools/perf/util/evsel.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 390690eb8781..dc40fe32210b 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -120,6 +120,13 @@ int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus, struct thread_map *threads); void perf_evsel__close(struct perf_evsel *evsel, int ncpus, int nthreads); +struct perf_sample; + +char *perf_evsel__strval(struct perf_evsel *evsel, struct perf_sample *sample, + const char *name); +u64 perf_evsel__intval(struct perf_evsel *evsel, struct perf_sample *sample, + const char *name); + #define perf_evsel__match(evsel, t, c) \ (evsel->attr.type == PERF_TYPE_##t && \ evsel->attr.config == PERF_COUNT_##c) |