linux-sg2042/arch/powerpc
Thiago Jung Bauermann 7132e2d669 ftrace: Match dot symbols when searching functions on ppc64
In the ppc64 big endian ABI, function symbols point to function
descriptors. The symbols which point to the function entry points
have a dot in front of the function name. Consequently, when the
ftrace filter mechanism searches for the symbol corresponding to
an entry point address, it gets the dot symbol.

As a result, ftrace filter users have to be aware of this ABI detail on
ppc64 and prepend a dot to the function name when setting the filter.

The perf probe command insulates the user from this by ignoring the dot
in front of the symbol name when matching function names to symbols,
but the sysfs interface does not. This patch makes the ftrace filter
mechanism do the same when searching symbols.

Fixes the following failure in ftracetest's kprobe_ftrace.tc:

  .../kprobe_ftrace.tc: line 9: echo: write error: Invalid argument

That failure is on this line of kprobe_ftrace.tc:

  echo _do_fork > set_ftrace_filter

This is because there's no _do_fork entry in the functions list:

  # cat available_filter_functions | grep _do_fork
  ._do_fork

This change introduces no regressions on the perf and ftracetest
testsuite results.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-04-27 09:47:29 +10:00
..
boot powerpc/fsl/dts: Add "jedec,spi-nor" flash compatible 2016-03-11 20:06:41 -06:00
configs powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
crypto powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
include powerpc: Add support for userspace P9 copy paste 2016-04-27 09:28:07 +10:00
kernel ftrace: Match dot symbols when searching functions on ppc64 2016-04-27 09:47:29 +10:00
kvm KVM: PPC: do not compile in vfio.o unconditionally 2016-03-22 16:38:38 +01:00
lib powerpc: rework sparse for lib/xor_vmx.c 2016-04-27 09:33:37 +10:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc: sparse: Include headers for __weak symbols 2016-04-12 21:05:19 +10:00
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-01-06 00:43:52 -05:00
oprofile powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
perf powerpc/perf: Add support for sampling interrupt register state 2016-04-21 23:32:59 +10:00
platforms powerpc/cell: Make spu_base.c explicitly non-modular 2016-04-11 20:30:42 +10:00
scripts powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel 2016-03-07 14:53:56 +11:00
sysdev powerpc/mpic: handle subsys_system_register() failure 2016-04-27 09:23:41 +10:00
xmon powerpc/xmon: Add xmon command to dump process/task similar to ps(1) 2016-02-10 10:22:04 +11:00
Kconfig powerpc/perf: Add support for sampling interrupt register state 2016-04-21 23:32:59 +10:00
Kconfig.debug powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
Makefile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2016-03-14 20:05:14 +11:00
relocs_check.sh powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00