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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

부모
5d1ee0413c
커밋
ef4a356574
@@ -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", ¶ms.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;
|
||||
|
Reference in New Issue
Block a user