diff options
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r-- | tools/perf/builtin-probe.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index c1e54035e8cf..61c6d70732c9 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -54,6 +54,7 @@ static struct { | |||
54 | struct perf_probe_event events[MAX_PROBES]; | 54 | struct perf_probe_event events[MAX_PROBES]; |
55 | struct strlist *dellist; | 55 | struct strlist *dellist; |
56 | struct line_range line_range; | 56 | struct line_range line_range; |
57 | int max_probe_points; | ||
57 | } params; | 58 | } params; |
58 | 59 | ||
59 | 60 | ||
@@ -179,6 +180,8 @@ static const struct option options[] = { | |||
179 | "file", "vmlinux pathname"), | 180 | "file", "vmlinux pathname"), |
180 | #endif | 181 | #endif |
181 | OPT__DRY_RUN(&probe_event_dry_run), | 182 | OPT__DRY_RUN(&probe_event_dry_run), |
183 | OPT_INTEGER('\0', "max-probes", ¶ms.max_probe_points, | ||
184 | "Set how many probe points can be found for a probe."), | ||
182 | OPT_END() | 185 | OPT_END() |
183 | }; | 186 | }; |
184 | 187 | ||
@@ -200,6 +203,9 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) | |||
200 | } | 203 | } |
201 | } | 204 | } |
202 | 205 | ||
206 | if (params.max_probe_points == 0) | ||
207 | params.max_probe_points = MAX_PROBES; | ||
208 | |||
203 | if ((!params.nevents && !params.dellist && !params.list_events && | 209 | if ((!params.nevents && !params.dellist && !params.list_events && |
204 | !params.show_lines)) | 210 | !params.show_lines)) |
205 | usage_with_options(probe_usage, options); | 211 | usage_with_options(probe_usage, options); |
@@ -246,7 +252,8 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) | |||
246 | 252 | ||
247 | if (params.nevents) { | 253 | if (params.nevents) { |
248 | ret = add_perf_probe_events(params.events, params.nevents, | 254 | ret = add_perf_probe_events(params.events, params.nevents, |
249 | params.force_add); | 255 | params.force_add, |
256 | params.max_probe_points); | ||
250 | if (ret < 0) { | 257 | if (ret < 0) { |
251 | pr_err(" Error: Failed to add events. (%d)\n", ret); | 258 | pr_err(" Error: Failed to add events. (%d)\n", ret); |
252 | return ret; | 259 | return ret; |