OSDN Git Service

ftrace/x86: Have function graph tracer use its own trampoline
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Sat, 12 Jul 2014 03:23:53 +0000 (23:23 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 17 Jul 2014 13:44:37 +0000 (09:44 -0400)
The function graph trampoline is called from the function trampoline
and both do a save and restore of registers. The save of registers
done by the function trampoline when only the function graph tracer
is running is a waste of CPU cycles.

As the function graph tracer trampoline in x86 is dependent from
the function trampoline, we can call it directly when a function
is only being traced by the function graph trampoline.

Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
arch/x86/include/asm/ftrace.h

index 0525a8b..e1f7fec 100644 (file)
@@ -68,6 +68,8 @@ struct dyn_arch_ftrace {
 
 int ftrace_int3_handler(struct pt_regs *regs);
 
+#define FTRACE_GRAPH_TRAMP_ADDR FTRACE_GRAPH_ADDR
+
 #endif /*  CONFIG_DYNAMIC_FTRACE */
 #endif /* __ASSEMBLY__ */
 #endif /* CONFIG_FUNCTION_TRACER */