]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc64, ftrace: save toc only on modules for function graph
authorSteven Rostedt <srostedt@redhat.com>
Wed, 11 Feb 2009 20:45:49 +0000 (12:45 -0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 22 Feb 2009 23:48:54 +0000 (10:48 +1100)
commit3710505e4568367c05d1086f524d0c45ac7eb592
treef2ee8c966035a67be77fad922ada4c4d52a53be9
parent9176955fb4cc4a7755ed2d85a15fd445f2eaf7de
powerpc64, ftrace: save toc only on modules for function graph

The TOCS used by modules are different than the one used by
the core kernel code. The function graph tracer must save and
restore the TOC whenever it traces a module call. But this
is an added overhead to burden the majority of core kernel
code being traced.

Benjamin Herrenschmidt suggested in testing the entry of
the call to tell if it is a core kernel function or a module.
He recommended using the REGION_ID() macro to perform this test.

This patch implements Benjamin's idea, and uses a different
return_to_handler routine dependent on if the entry is a core
kernel function or not. The module version saves the TOC, where as
the core kernel version does not.

Geoff Lavand tested on PS3.

Tested-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/ftrace.c