linux-sg2042/tools/perf/arch
Ravi Bangoria a1d9972e59 perf uretprobe ppc64le: Fix probe location
Perf uretprobe probes on GEP(Global Entry Point) which fails to record
all function calls via LEP(Local Entry Point). Fix that by probing on LEP.

Objdump:

  00000000100005f0 <doit>:
      100005f0:   02 10 40 3c     lis     r2,4098
      100005f4:   00 7f 42 38     addi    r2,r2,32512
      100005f8:   a6 02 08 7c     mflr    r0
      100005fc:   10 00 01 f8     std     r0,16(r1)
      10000600:   f8 ff e1 fb     std     r31,-8(r1)

Before applying patch:

  $ cat /sys/kernel/debug/tracing/uprobe_events
    r:probe_uprobe_test/doit /home/ravi/uprobe_test:0x00000000000005f0

After applying patch:

  $ cat /sys/kernel/debug/tracing/uprobe_events
    r:probe_uprobe_test/doit /home/ravi/uprobe_test:0x00000000000005f8

This is not the case with kretprobes because the kernel itself finds LEP
and probes on it.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1475576865-6562-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-10-05 08:14:22 -03:00
..
alpha perf tools: Add empty Build files for architectures lacking them 2015-08-06 16:24:15 -03:00
arm perf tools: Add sink configuration for cs_etm PMU 2016-09-22 13:08:55 -03:00
arm64 perf tools: Add coresight etm PMU record capabilities 2016-09-22 12:19:40 -03:00
mips perf tools: Add empty Build files for architectures lacking them 2015-08-06 16:24:15 -03:00
parisc perf tools: Add empty Build files for architectures lacking them 2015-08-06 16:24:15 -03:00
powerpc perf uretprobe ppc64le: Fix probe location 2016-10-05 08:14:22 -03:00
s390 perf probe: Support probing on offline cross-arch binary 2016-09-01 12:41:09 -03:00
sh perf probe: Support probing on offline cross-arch binary 2016-09-01 12:41:09 -03:00
sparc perf probe: Support probing on offline cross-arch binary 2016-09-01 12:41:09 -03:00
x86 perf tools: Support CPU id matching for x86 v2 2016-10-03 19:58:01 -03:00
xtensa perf probe: Support probing on offline cross-arch binary 2016-09-01 12:41:09 -03:00
Build perf build: Add arch x86 objects building 2015-02-12 13:12:01 -03:00
common.c perf tools: Remove needless includes from cache.h 2016-07-12 15:19:58 -03:00
common.h perf tools: Export normalize_arch() function 2016-06-07 12:08:53 -03:00