summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-finder.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2017-01-11 15:01:57 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-01-16 15:43:04 -0300
commit613f050d68a8ed3c0b18b9568698908ef7bbc1f7 (patch)
tree8686d3af5c1e7475fc66f332de8fe572f4bfc590 /tools/perf/util/probe-finder.h
parent3e96dac7c956089d3f23aca98c4dfca57b6aaf8a (diff)
downloadlinux-613f050d68a8ed3c0b18b9568698908ef7bbc1f7.tar.gz
linux-613f050d68a8ed3c0b18b9568698908ef7bbc1f7.tar.bz2
linux-613f050d68a8ed3c0b18b9568698908ef7bbc1f7.zip
perf probe: Fix to probe on gcc generated functions in modules
Fix to probe on gcc generated functions on modules. Since probing on a module is based on its symbol name, it should be adjusted on actual symbols. E.g. without this fix, perf probe shows probe definition on non-exist symbol as below. $ perf probe -m build-x86_64/net/netfilter/nf_nat.ko -F in_range* in_range.isra.12 $ perf probe -m build-x86_64/net/netfilter/nf_nat.ko -D in_range p:probe/in_range nf_nat:in_range+0 With this fix, perf probe correctly shows a probe on gcc-generated symbol. $ perf probe -m build-x86_64/net/netfilter/nf_nat.ko -D in_range p:probe/in_range nf_nat:in_range.isra.12+0 This also fixes same problem on online module as below. $ perf probe -m i915 -D assert_plane p:probe/assert_plane i915:assert_plane.constprop.134+0 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/148411450673.9978.14905987549651656075.stgit@devbox 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h
index f1d8558f498e..2956c5198652 100644
--- a/tools/perf/util/probe-finder.h
+++ b/tools/perf/util/probe-finder.h
@@ -46,6 +46,9 @@ int debuginfo__find_trace_events(struct debuginfo *dbg,
int debuginfo__find_probe_point(struct debuginfo *dbg, unsigned long addr,
struct perf_probe_point *ppt);
+int debuginfo__get_text_offset(struct debuginfo *dbg, Dwarf_Addr *offs,
+ bool adjust_offset);
+
/* Find a line range */
int debuginfo__find_line_range(struct debuginfo *dbg, struct line_range *lr);