From: Steven Rostedt Date: Wed, 11 Feb 2009 20:45:49 +0000 (-0800) Subject: powerpc64, ftrace: save toc only on modules for function graph X-Git-Tag: v2.6.30-rc1~619^2~101 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb7253403f7a4670a128e4c080fd8ea1bd4d5029;p=pandora-kernel.git 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 Acked-by: Benjamin Herrenschmidt Signed-off-by: Steven Rostedt Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed