diff options
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 { | |||
51 | bool force_add; | 51 | bool force_add; |
52 | bool show_lines; | 52 | bool show_lines; |
53 | bool show_vars; | 53 | bool show_vars; |
54 | bool show_ext_vars; | ||
54 | bool mod_events; | 55 | bool mod_events; |
55 | int nevents; | 56 | int nevents; |
56 | struct perf_probe_event events[MAX_PROBES]; | 57 | struct perf_probe_event events[MAX_PROBES]; |
@@ -162,7 +163,7 @@ static const char * const probe_usage[] = { | |||
162 | "perf probe --list", | 163 | "perf probe --list", |
163 | #ifdef DWARF_SUPPORT | 164 | #ifdef DWARF_SUPPORT |
164 | "perf probe --line 'LINEDESC'", | 165 | "perf probe --line 'LINEDESC'", |
165 | "perf probe --vars 'PROBEPOINT'", | 166 | "perf probe [--externs] --vars 'PROBEPOINT'", |
166 | #endif | 167 | #endif |
167 | NULL | 168 | NULL |
168 | }; | 169 | }; |
@@ -207,6 +208,8 @@ static const struct option options[] = { | |||
207 | OPT_CALLBACK('V', "vars", NULL, | 208 | OPT_CALLBACK('V', "vars", NULL, |
208 | "FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT", | 209 | "FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT", |
209 | "Show accessible variables on PROBEDEF", opt_show_vars), | 210 | "Show accessible variables on PROBEDEF", opt_show_vars), |
211 | OPT_BOOLEAN('\0', "externs", ¶ms.show_ext_vars, | ||
212 | "Show external variables too (with --vars only)"), | ||
210 | OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, | 213 | OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, |
211 | "file", "vmlinux pathname"), | 214 | "file", "vmlinux pathname"), |
212 | OPT_STRING('s', "source", &symbol_conf.source_prefix, | 215 | OPT_STRING('s', "source", &symbol_conf.source_prefix, |
@@ -287,7 +290,8 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) | |||
287 | usage_with_options(probe_usage, options); | 290 | usage_with_options(probe_usage, options); |
288 | } | 291 | } |
289 | ret = show_available_vars(params.events, params.nevents, | 292 | ret = show_available_vars(params.events, params.nevents, |
290 | params.max_probe_points); | 293 | params.max_probe_points, |
294 | params.show_ext_vars); | ||
291 | if (ret < 0) | 295 | if (ret < 0) |
292 | pr_err(" Error: Failed to show vars. (%d)\n", ret); | 296 | pr_err(" Error: Failed to show vars. (%d)\n", ret); |
293 | return ret; | 297 | return ret; |