diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2014-02-06 00:32:27 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-02-18 07:38:44 -0500 |
commit | a15ad2f5360c821f030c53266ebf467738249c68 (patch) | |
tree | cf8be8f908551177cb25e35075ab9c9e2045593a /tools/perf/util/probe-event.c | |
parent | eb948e50831bc64e6bb2589be7575ed7c159a429 (diff) |
perf probe: Support distro-style debuginfo for uprobe
Support distro-style debuginfo supported by dso for setting uprobes.
Note that this tries to find a debuginfo file based on the real path of
the target binary. If the debuginfo is not correctly installed on the
system, this can not find it.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: "David A. Long" <dave.long@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20140206053227.29635.54434.stgit@kbuild-fedora.yrl.intra.hitachi.co.jp
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 42bec67aaa38..0d1542f33d87 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -256,17 +256,14 @@ static void clear_probe_trace_events(struct probe_trace_event *tevs, int ntevs) | |||
256 | } | 256 | } |
257 | 257 | ||
258 | #ifdef HAVE_DWARF_SUPPORT | 258 | #ifdef HAVE_DWARF_SUPPORT |
259 | |||
259 | /* Open new debuginfo of given module */ | 260 | /* Open new debuginfo of given module */ |
260 | static struct debuginfo *open_debuginfo(const char *module) | 261 | static struct debuginfo *open_debuginfo(const char *module) |
261 | { | 262 | { |
262 | const char *path; | 263 | const char *path = module; |
263 | 264 | ||
264 | /* A file path -- this is an offline module */ | 265 | if (!module || !strchr(module, '/')) { |
265 | if (module && strchr(module, '/')) | ||
266 | path = module; | ||
267 | else { | ||
268 | path = kernel_get_module_path(module); | 266 | path = kernel_get_module_path(module); |
269 | |||
270 | if (!path) { | 267 | if (!path) { |
271 | pr_err("Failed to find path of %s module.\n", | 268 | pr_err("Failed to find path of %s module.\n", |
272 | module ?: "kernel"); | 269 | module ?: "kernel"); |