linux/tools/perf/arch/powerpc/util
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
..
book3s_hcalls.h perf kvm/powerpc: Add support for HCALL reasons 2016-01-29 17:49:54 -03:00
book3s_hv_exits.h perf kvm/powerpc: Port perf kvm stat to powerpc 2016-01-29 17:49:54 -03:00
Build perf/powerpc: Add support for unwinding perf-stackdump 2016-05-11 21:54:06 +10:00
dwarf-regs.c perf tools powerpc: Add support for generating bpf prologue 2016-05-05 21:03:58 -03:00
header.c perf powerpc: Support CPU ID matching for Powerpc 2016-10-03 19:58:01 -03:00
kvm-stat.c perf kvm/powerpc: Add support for HCALL reasons 2016-01-29 17:49:54 -03:00
perf_regs.c tool/perf: Add sample_reg_mask to include all perf_regs 2016-04-21 23:33:00 +10:00
skip-callchain-idx.c perf tools powerpc: Use dwfl_report_elf() instead of offline. 2015-01-16 17:49:30 -03:00
sym-handling.c perf uretprobe ppc64le: Fix probe location 2016-10-05 08:14:22 -03:00
unwind-libunwind.c perf/powerpc: Add support for unwinding perf-stackdump 2016-05-11 21:54:06 +10:00