aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-event.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2010-03-16 18:06:26 -0400
committerIngo Molnar <mingo@elte.hu>2010-03-17 07:11:15 -0400
commit7df2f32956cf0f1a45df38cd0e0fe0c3467580e8 (patch)
tree1cccbf0d4239ebdd9c0f67762b5a2f0facbe53dc /tools/perf/util/probe-event.h
parentfb1587d869a399554220e166d4b90b581a8ade01 (diff)
perf probe: Add data structure member access support
Support accessing members in the data structures. With this, perf-probe accepts data-structure members(IOW, it now accepts dot '.' and arrow '->' operators) as probe arguemnts. e.g. ./perf probe --add 'schedule:44 rq->curr' ./perf probe --add 'vfs_read file->f_op->read file->f_path.dentry' Note that '>' can be interpreted as redirection in command-line. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20100316220626.32050.57552.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/probe-event.h')
-rw-r--r--tools/perf/util/probe-event.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 2a2f0a26dc67..cd308b0a4d96 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -45,9 +45,17 @@ struct perf_probe_point {
45 bool retprobe; /* Return probe flag */ 45 bool retprobe; /* Return probe flag */
46}; 46};
47 47
48/* Perf probe probing argument field chain */
49struct perf_probe_arg_field {
50 struct perf_probe_arg_field *next; /* Next field */
51 char *name; /* Name of the field */
52 bool ref; /* Referencing flag */
53};
54
48/* Perf probe probing argument */ 55/* Perf probe probing argument */
49struct perf_probe_arg { 56struct perf_probe_arg {
50 char *name; /* Argument name */ 57 char *name; /* Argument name */
58 struct perf_probe_arg_field *field; /* Structure fields */
51}; 59};
52 60
53/* Perf probe probing event (point + arg) */ 61/* Perf probe probing event (point + arg) */
@@ -86,6 +94,8 @@ extern void parse_kprobe_trace_command(const char *cmd,
86/* Events to command string */ 94/* Events to command string */
87extern char *synthesize_perf_probe_command(struct perf_probe_event *pev); 95extern char *synthesize_perf_probe_command(struct perf_probe_event *pev);
88extern char *synthesize_kprobe_trace_command(struct kprobe_trace_event *tev); 96extern char *synthesize_kprobe_trace_command(struct kprobe_trace_event *tev);
97extern int synthesize_perf_probe_arg(struct perf_probe_arg *pa, char *buf,
98 size_t len);
89 99
90/* Check the perf_probe_event needs debuginfo */ 100/* Check the perf_probe_event needs debuginfo */
91extern bool perf_probe_event_need_dwarf(struct perf_probe_event *pev); 101extern bool perf_probe_event_need_dwarf(struct perf_probe_event *pev);