diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2010-10-21 19:13:35 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-10-21 16:06:42 -0200 |
commit | fb8c5a56c7ddbc2b0d2ee7a8da60fe1355f75141 (patch) | |
tree | 0d7575627d9fbcdeb642fbcb6ed84744fe9763f5 /tools/perf/builtin-probe.c | |
parent | c82ec0a2bd7725a2d2ac3065d8cde13e1f717d3c (diff) | |
download | talos-obmc-linux-fb8c5a56c7ddbc2b0d2ee7a8da60fe1355f75141.tar.gz talos-obmc-linux-fb8c5a56c7ddbc2b0d2ee7a8da60fe1355f75141.zip |
perf probe: Show accessible global variables
Add --externs for allowing --vars to show accessible global (externally
defined) variables from a given probe point too.
This will give you a hint which globals can be accessible from the probe point.
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: <20101021101335.3542.31003.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/builtin-probe.c')
-rw-r--r-- | tools/perf/builtin-probe.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index c777bec28466..bdf60cfdf70f 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -51,6 +51,7 @@ static struct { bool force_add; bool show_lines; bool show_vars; + bool show_ext_vars; bool mod_events; int nevents; struct perf_probe_event events[MAX_PROBES]; @@ -162,7 +163,7 @@ static const char * const probe_usage[] = { "perf probe --list", #ifdef DWARF_SUPPORT "perf probe --line 'LINEDESC'", - "perf probe --vars 'PROBEPOINT'", + "perf probe [--externs] --vars 'PROBEPOINT'", #endif NULL }; @@ -207,6 +208,8 @@ static const struct option options[] = { OPT_CALLBACK('V', "vars", NULL, "FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT", "Show accessible variables on PROBEDEF", opt_show_vars), + OPT_BOOLEAN('\0', "externs", ¶ms.show_ext_vars, + "Show external variables too (with --vars only)"), OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, "file", "vmlinux pathname"), OPT_STRING('s', "source", &symbol_conf.source_prefix, @@ -287,7 +290,8 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) usage_with_options(probe_usage, options); } ret = show_available_vars(params.events, params.nevents, - params.max_probe_points); + params.max_probe_points, + params.show_ext_vars); if (ret < 0) pr_err(" Error: Failed to show vars. (%d)\n", ret); return ret; |