perf probe: add kernel source path option
PATCH 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.
--- tools/perf/Documentation/perf-probe.txt | 4 ++ tools/perf/builtin-probe.c | 2 + tools/perf/util/probe-finder.c | 56 +++++++++++++++++++++++++++++- tools/perf/util/symbol.h | 1 + 4 files changed, 61 insertions(+), 2 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
@@ -167,6 +167,8 @@ static const struct option options[] = {#ifndef NO_DWARF_SUPPORT 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_BOOLEAN ('l' ,"list" , &session.list_events, "list up current probe events"),
tools/perf/util/probe-finder.c +54 -2
74 lines not on this page · raw message
tools/perf/util/symbol.h +1 -0
@@ -65,6 +65,7 @@ struct symbol_conf { exclude_other, full_paths;const char *vmlinux_name, + *source_prefix, *field_sep;char *dso_list_str, *comm_list_str,
Signature · 1 line
1.7.0.4
Quoted 6 lines · Chase Douglas
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.
Quoted 7 lines
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 | 56 +++++++++++++++++++++++++++++- tools/perf/util/symbol.h | 1 + 4 files changed, 61 insertions(+), 2 deletions(-)
Please disregard this patch. It is based on the 2.6.34 kernel and I forgot to rebase it on the latest perf code. I have a newer patch I will be sending out shortly.
Thanks,
-- Chase