summaryrefslogtreecommitdiff
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-09-27 03:22:00 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-09-27 03:22:00 +0400
commit5d2074ea4fdb28b2199958f42edf914d27c926f6 (patch)
tree34f6e1b8ff232ec735654f988adad447f484f0f6 /tools/perf/util/evsel.h
parent82fe1c290cd26a3d092beb1e9755647d284a4134 (diff)
downloadlinux-5d2074ea4fdb28b2199958f42edf914d27c926f6.tar.xz
perf evsel: Introduce rawptr() method
Will be used for things like the args field in the raw_syscalls:sys_enter tracepoint. Implement strval with it, its basicaly strval returning void *. 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-v9x3q9rv4caxtox7wtjpchq5@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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 25043ff17fd7..2c4905020105 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -128,11 +128,18 @@ 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,
+void *perf_evsel__rawptr(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);
+static inline char *perf_evsel__strval(struct perf_evsel *evsel,
+ struct perf_sample *sample,
+ const char *name)
+{
+ return perf_evsel__rawptr(evsel, sample, name);
+}
+
struct format_field;
struct format_field *perf_evsel__field(struct perf_evsel *evsel, const char *name);