diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-26 19:22:00 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-26 19:22:00 -0400 |
commit | 5d2074ea4fdb28b2199958f42edf914d27c926f6 (patch) | |
tree | 34f6e1b8ff232ec735654f988adad447f484f0f6 /tools/perf | |
parent | 82fe1c290cd26a3d092beb1e9755647d284a4134 (diff) |
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')
-rw-r--r-- | tools/perf/util/evsel.c | 2 | ||||
-rw-r--r-- | tools/perf/util/evsel.h | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 6f2a8c30413e..e992b67e0f3a 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -1104,7 +1104,7 @@ struct format_field *perf_evsel__field(struct perf_evsel *evsel, const char *nam | |||
1104 | return pevent_find_field(evsel->tp_format, name); | 1104 | return pevent_find_field(evsel->tp_format, name); |
1105 | } | 1105 | } |
1106 | 1106 | ||
1107 | char *perf_evsel__strval(struct perf_evsel *evsel, struct perf_sample *sample, | 1107 | void *perf_evsel__rawptr(struct perf_evsel *evsel, struct perf_sample *sample, |
1108 | const char *name) | 1108 | const char *name) |
1109 | { | 1109 | { |
1110 | struct format_field *field = perf_evsel__field(evsel, name); | 1110 | struct format_field *field = perf_evsel__field(evsel, name); |
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); | |||
128 | 128 | ||
129 | struct perf_sample; | 129 | struct perf_sample; |
130 | 130 | ||
131 | char *perf_evsel__strval(struct perf_evsel *evsel, struct perf_sample *sample, | 131 | void *perf_evsel__rawptr(struct perf_evsel *evsel, struct perf_sample *sample, |
132 | const char *name); | 132 | const char *name); |
133 | u64 perf_evsel__intval(struct perf_evsel *evsel, struct perf_sample *sample, | 133 | u64 perf_evsel__intval(struct perf_evsel *evsel, struct perf_sample *sample, |
134 | const char *name); | 134 | const char *name); |
135 | 135 | ||
136 | static inline char *perf_evsel__strval(struct perf_evsel *evsel, | ||
137 | struct perf_sample *sample, | ||
138 | const char *name) | ||
139 | { | ||
140 | return perf_evsel__rawptr(evsel, sample, name); | ||
141 | } | ||
142 | |||
136 | struct format_field; | 143 | struct format_field; |
137 | 144 | ||
138 | struct format_field *perf_evsel__field(struct perf_evsel *evsel, const char *name); | 145 | struct format_field *perf_evsel__field(struct perf_evsel *evsel, const char *name); |