summaryrefslogtreecommitdiff
path: root/tools/perf/util/probe-finder.h
diff options
context:
space:
mode:
authorNaohiro Aota <naota@elisp.net>2015-03-13 14:18:40 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-04-13 20:11:05 -0300
commit09ed8975c4b13be4469899b210f0e0936021ee8f (patch)
treea43f72cd4225a93992fcaf7e0f670e4ead95826c /tools/perf/util/probe-finder.h
parent9d7b45c5721dfd524666bc1f07cf7d0855edb4d5 (diff)
perf probe: Find compilation directory path for lazy matching
If we use lazy matching, it failed to open a souce file if perf command is invoked outside of compilation directory: $ perf probe -a '__schedule;clear_*' Failed to open kernel/sched/core.c: No such file or directory Error: Failed to add events. (-2) OTOH, other commands like "probe -L" can solve the souce directory by themselves. Let's make it possible for lazy matching too! Signed-off-by: Naohiro Aota <naota@elisp.net> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1426223923-1493-1-git-send-email-naota@elisp.net Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-finder.h')
-rw-r--r--tools/perf/util/probe-finder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h
index 92590b2c7e1c..ebf8c8c81453 100644
--- a/tools/perf/util/probe-finder.h
+++ b/tools/perf/util/probe-finder.h
@@ -55,6 +55,10 @@ extern int debuginfo__find_available_vars_at(struct debuginfo *dbg,
struct variable_list **vls,
int max_points, bool externs);
+/* Find a src file from a DWARF tag path */
+int get_real_path(const char *raw_path, const char *comp_dir,
+ char **new_path);
+
struct probe_finder {
struct perf_probe_event *pev; /* Target probe event */