diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2010-10-21 06:13:23 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-10-21 13:59:06 -0400 |
commit | cf6eb489e5c04c8f8d5fd7bf90b8346c987688bc (patch) | |
tree | 3da471c3ae3f99cdcbec26cc95412a4b44506f3c /tools/perf/util/probe-event.h | |
parent | 632941c4f8fbd5b90dcb1672cd0422dfd7332bc9 (diff) |
perf probe: Show accessible local variables
Add -V (--vars) option for listing accessible local variables at given probe
point. This will help finding which local variables are available for event
arguments.
e.g.)
# perf probe -V call_timer_fn:23
Available variables at call_timer_fn:23
@<run_timer_softirq+345>
function_type* fn
int preempt_count
long unsigned int data
struct list_head work_list
struct list_head* head
struct timer_list* timer
struct tvec_base* base
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20101021101323.3542.40282.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.h')
-rw-r--r-- | tools/perf/util/probe-event.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h index 5af39243a25b..727a7fe81a02 100644 --- a/tools/perf/util/probe-event.h +++ b/tools/perf/util/probe-event.h | |||
@@ -90,6 +90,12 @@ struct line_range { | |||
90 | struct list_head line_list; /* Visible lines */ | 90 | struct list_head line_list; /* Visible lines */ |
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* List of variables */ | ||
94 | struct variable_list { | ||
95 | struct probe_trace_point point; /* Actual probepoint */ | ||
96 | struct strlist *vars; /* Available variables */ | ||
97 | }; | ||
98 | |||
93 | /* Command string to events */ | 99 | /* Command string to events */ |
94 | extern int parse_perf_probe_command(const char *cmd, | 100 | extern int parse_perf_probe_command(const char *cmd, |
95 | struct perf_probe_event *pev); | 101 | struct perf_probe_event *pev); |
@@ -115,6 +121,8 @@ extern int add_perf_probe_events(struct perf_probe_event *pevs, int npevs, | |||
115 | extern int del_perf_probe_events(struct strlist *dellist); | 121 | extern int del_perf_probe_events(struct strlist *dellist); |
116 | extern int show_perf_probe_events(void); | 122 | extern int show_perf_probe_events(void); |
117 | extern int show_line_range(struct line_range *lr); | 123 | extern int show_line_range(struct line_range *lr); |
124 | extern int show_available_vars(struct perf_probe_event *pevs, int npevs, | ||
125 | int max_probe_points); | ||
118 | 126 | ||
119 | 127 | ||
120 | /* Maximum index number of event-name postfix */ | 128 | /* Maximum index number of event-name postfix */ |