perf uretprobe ppc64le: Fix probe location
authorRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Tue, 4 Oct 2016 10:27:45 +0000 (15:57 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 5 Oct 2016 11:14:22 +0000 (08:14 -0300)
commita1d9972e59e15538458c030affbfc298c32a47f8
treed962bf5c549e92a8dabc06932fe0a55b8002a7a3
parent8657355f5b5f657407efc12a2223e8a3a6d658de
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>
tools/perf/arch/powerpc/util/sym-handling.c