]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
perf probe: Fix to probe on gcc generated functions in modules
authorMasami Hiramatsu <mhiramat@kernel.org>
Wed, 11 Jan 2017 06:01:57 +0000 (15:01 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 16 Jan 2017 18:43:04 +0000 (15:43 -0300)
commit613f050d68a8ed3c0b18b9568698908ef7bbc1f7
tree8686d3af5c1e7475fc66f332de8fe572f4bfc590
parent3e96dac7c956089d3f23aca98c4dfca57b6aaf8a
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>
tools/perf/util/probe-event.c
tools/perf/util/probe-finder.c
tools/perf/util/probe-finder.h