diff options
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r-- | tools/perf/builtin-probe.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 2c0e64d0b4a..710ae3d0a48 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -134,10 +134,18 @@ static int opt_show_lines(const struct option *opt __used, | |||
134 | { | 134 | { |
135 | int ret = 0; | 135 | int ret = 0; |
136 | 136 | ||
137 | if (str) | 137 | if (!str) |
138 | ret = parse_line_range_desc(str, ¶ms.line_range); | 138 | return 0; |
139 | INIT_LIST_HEAD(¶ms.line_range.line_list); | 139 | |
140 | if (params.show_lines) { | ||
141 | pr_warning("Warning: more than one --line options are" | ||
142 | " detected. Only the first one is valid.\n"); | ||
143 | return 0; | ||
144 | } | ||
145 | |||
140 | params.show_lines = true; | 146 | params.show_lines = true; |
147 | ret = parse_line_range_desc(str, ¶ms.line_range); | ||
148 | INIT_LIST_HEAD(¶ms.line_range.line_list); | ||
141 | 149 | ||
142 | return ret; | 150 | return ret; |
143 | } | 151 | } |
@@ -242,7 +250,8 @@ static const struct option options[] = { | |||
242 | OPT_STRING('s', "source", &symbol_conf.source_prefix, | 250 | OPT_STRING('s', "source", &symbol_conf.source_prefix, |
243 | "directory", "path to kernel source"), | 251 | "directory", "path to kernel source"), |
244 | OPT_STRING('m', "module", ¶ms.target_module, | 252 | OPT_STRING('m', "module", ¶ms.target_module, |
245 | "modname", "target module name"), | 253 | "modname|path", |
254 | "target module name (for online) or path (for offline)"), | ||
246 | #endif | 255 | #endif |
247 | OPT__DRY_RUN(&probe_event_dry_run), | 256 | OPT__DRY_RUN(&probe_event_dry_run), |
248 | OPT_INTEGER('\0', "max-probes", ¶ms.max_probe_points, | 257 | OPT_INTEGER('\0', "max-probes", ¶ms.max_probe_points, |