]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tracing/function-return-tracer: call prepare_ftrace_return by registers
authorFrederic Weisbecker <fweisbec@gmail.com>
Wed, 12 Nov 2008 21:49:23 +0000 (22:49 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 12 Nov 2008 22:15:43 +0000 (23:15 +0100)
Impact: Optimize a bit the function return tracer

This patch changes the calling convention of prepare_ftrace_return to
pass its arguments by register. This will optimize it a bit and
prepare it to support dynamic tracing.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/entry_32.S
arch/x86/kernel/ftrace.c

index 9a0ac85946dbf40429d6adf3e6e5d90bf7b5ce33..f97621149839dab962d2be9e254aa728e433dbef 100644 (file)
@@ -1217,12 +1217,9 @@ trace_return:
        pushl %eax
        pushl %ecx
        pushl %edx
-       movl 0xc(%esp), %eax
-       pushl %eax
+       movl 0xc(%esp), %edx
        lea 0x4(%ebp), %eax
-       pushl %eax
        call prepare_ftrace_return
-       addl $8, %esp
        popl %edx
        popl %ecx
        popl %eax
index 1db0e121a3e70f1c5039db96d76e53b80720c1b5..fe832738e1e2794beb45a18b9a9424946b3d8f61 100644 (file)
@@ -95,7 +95,6 @@ unsigned long ftrace_return_to_handler(void)
  * Hook the return address and push it in the stack of return addrs
  * in current thread info.
  */
-asmlinkage
 void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
 {
        unsigned long old;