ftrace: have function graph use mcount caller address
authorSteven Rostedt <srostedt@redhat.com>
Tue, 2 Dec 2008 20:34:09 +0000 (15:34 -0500)
committerIngo Molnar <mingo@elte.hu>
Wed, 3 Dec 2008 07:56:22 +0000 (08:56 +0100)
Impact: consistency change for function graph

This patch makes function graph record the mcount caller address
the same way the function tracer does.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_64.S

index 958af86186c4bbdb22242fc12181bab9ee5dbaf3..826682abed1d9f91311f466d5f0a62b46d238062 100644 (file)
@@ -1230,6 +1230,7 @@ ENTRY(ftrace_graph_caller)
        pushl %edx
        movl 0xc(%esp), %edx
        lea 0x4(%ebp), %eax
+       subl $MCOUNT_INSN_SIZE, %edx
        call prepare_ftrace_return
        popl %edx
        popl %ecx
index 2aa0526ac30e9f8c7936c31f62959aedc39b01ff..9060ba6497e2714c6bbb73aab34b4879bc9e630c 100644 (file)
@@ -173,6 +173,7 @@ ENTRY(ftrace_graph_caller)
 
        leaq 8(%rbp), %rdi
        movq 0x38(%rsp), %rsi
+       subq $MCOUNT_INSN_SIZE, %rsi
 
        call    prepare_ftrace_return