remarkable-linux/tools
Masami Hiramatsu 8a937a25a7 perf probe: Fix to probe on gcc generated symbols for offline kernel
Fix perf-probe to show probe definition on gcc generated symbols for
offline kernel (including cross-arch kernel image).

gcc sometimes optimizes functions and generate new symbols with suffixes
such as ".constprop.N" or ".isra.N" etc. Since those symbol names are
not recorded in DWARF, we have to find correct generated symbols from
offline ELF binary to probe on it (kallsyms doesn't correct it).  For
online kernel or uprobes we don't need it because those are rebased on
_text, or a section relative address.

E.g. Without this:

  $ perf probe -k build-arm/vmlinux -F __slab_alloc*
  __slab_alloc.constprop.9
  $ perf probe -k build-arm/vmlinux -D __slab_alloc
  p:probe/__slab_alloc __slab_alloc+0

If you put above definition on target machine, it should fail
because there is no __slab_alloc in kallsyms.

With this fix, perf probe shows correct probe definition on
__slab_alloc.constprop.9:

  $ perf probe -k build-arm/vmlinux -D __slab_alloc
  p:probe/__slab_alloc __slab_alloc.constprop.9+0

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/148350060434.19001.11864836288580083501.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-01-04 11:44:22 -03:00
..
accounting
arch Merge branch 'core/urgent' into x86/fpu, to merge fixes 2016-11-01 07:47:40 +01:00
build perf build: Check LLVM version in feature check 2016-12-06 13:21:55 -03:00
cgroup
firewire
gpio
hv tools: hv: Enable network manager for bonding scripts on RHEL 2016-12-06 10:13:55 -05:00
iio
include tools lib bpf: Sync {tools,}/include/uapi/linux/bpf.h 2016-12-15 16:25:46 -03:00
kvm/kvm_stat
laptop
lguest
lib tools lib traceevent: Fix prev/next_prio for deadline tasks 2017-01-03 16:11:12 -03:00
net
nfsd
objtool objtool: Fix bytes check of lea's rex_prefix 2016-12-06 09:20:59 +01:00
pcmcia
perf perf probe: Fix to probe on gcc generated symbols for offline kernel 2017-01-04 11:44:22 -03:00
power tools/power/acpi: Remove direct kernel source include reference 2016-11-16 22:31:26 +01:00
scripts
spi
testing These are the documentation changes for 4.10. 2016-12-12 21:58:13 -08:00
thermal/tmon
time
usb
virtio ringtest: poll for new buffers once before updating event index 2016-10-31 00:21:43 +02:00
vm
Makefile