perf probe: add kernel source path option
PATCH v2 1/1 perf probe: add kernel source path option
The probe plugin requires access to the source code for some operations. The source code must be in the exact same location as specified by the DWARF tags, but sometimes the location is an absolute path that cannot be replicated by a normal user. This change adds the -s|--source option to allow the user to specify the root of the kernel source tree.
Signed-off-by Chase Douglas <[email protected]>
--- tools/perf/Documentation/perf-probe.txt | 4 ++ tools/perf/builtin-probe.c | 2 + tools/perf/util/probe-finder.c | 58 +++++++++++++++++++++++++++++-- tools/perf/util/symbol.h | 1 + 4 files changed, 62 insertions(+), 3 deletions(-)
tools/perf/Documentation/perf-probe.txt +4 -0
@@ -31,6 +31,10 @@ OPTIONS --vmlinux=PATH:: Specify vmlinux path which has debuginfo (Dwarf binary). +-s:: +--source=PATH:: + Specify path to kernel source. + -v:: --verbose:: Be more verbose (show parsed arguments, etc).
tools/perf/builtin-probe.c +2 -0
@@ -182,6 +182,8 @@ static const struct option options[] = { "Show source code lines.", opt_show_lines),OPT_STRING ('k' ,"vmlinux" , &symbol_conf.vmlinux_name,"file" ,"vmlinux pathname" ), +OPT_STRING ('s' ,"source" , &symbol_conf.source_prefix, +"directory" ,"path to kernel source" ), #endifOPT__DRY_RUN (&probe_event_dry_run), OPT_INTEGER('\0', "max-probes", ¶ms.max_probe_points,
tools/perf/util/probe-finder.c +55 -3
78 lines not on this page · raw message
tools/perf/util/symbol.h +1 -0
@@ -71,6 +71,7 @@ struct symbol_conf { full_paths, show_cpu_utilization;const char *vmlinux_name, + *source_prefix, *field_sep;const char *default_guest_vmlinux_name, *default_guest_kallsyms,
Signature · 1 line
1.7.0.4