aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-probe.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2010-04-21 15:56:40 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-04-26 15:35:20 -0300
commitef4a356574426877d569f8b6579325537eb7909b (patch)
tree0416c4ab1740a5ff6a07c01eee3e371128881110 /tools/perf/builtin-probe.c
parent5d1ee0413c8e2e0aa48510b1edfb3c4d2d43455b (diff)
perf probe: Add --max-probes option
Add --max-probes option to change the maximum limit of findable probe points per event, since inlined function can be expanded into thousands of probe points. Default value is 128. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> LKML-Reference: <20100421195640.24664.62984.stgit@localhost6.localdomain6> 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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index c1e54035e8c..61c6d70732c 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -54,6 +54,7 @@ static struct {
struct perf_probe_event events[MAX_PROBES];
struct strlist *dellist;
struct line_range line_range;
+ int max_probe_points;
} params;
@@ -179,6 +180,8 @@ static const struct option options[] = {
"file", "vmlinux pathname"),
#endif
OPT__DRY_RUN(&probe_event_dry_run),
+ OPT_INTEGER('\0', "max-probes", &params.max_probe_points,
+ "Set how many probe points can be found for a probe."),
OPT_END()
};
@@ -200,6 +203,9 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used)
}
}
+ if (params.max_probe_points == 0)
+ params.max_probe_points = MAX_PROBES;
+
if ((!params.nevents && !params.dellist && !params.list_events &&
!params.show_lines))
usage_with_options(probe_usage, options);
@@ -246,7 +252,8 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used)
if (params.nevents) {
ret = add_perf_probe_events(params.events, params.nevents,
- params.force_add);
+ params.force_add,
+ params.max_probe_points);
if (ret < 0) {
pr_err(" Error: Failed to add events. (%d)\n", ret);
return ret;