aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/entry_64.S
diff options
context:
space:
mode:
authorAbhishek Sagar <sagar.abhishek@gmail.com>2008-06-21 23:47:27 +0530
committerIngo Molnar <mingo@elte.hu>2008-06-23 22:10:56 +0200
commit395a59d0f8e86bb39cd700c3d185d30c670bb958 (patch)
tree1558e635efcede901c5dbe9acd625d475db5b369 /arch/x86/kernel/entry_64.S
parentf34bfb1beef8a17ba3d46b60f8fa19ffedc1ed8d (diff)
ftrace: store mcount address in rec->ip
Record the address of the mcount call-site. Currently all archs except sparc64 record the address of the instruction following the mcount call-site. Some general cleanups are entailed. Storing mcount addresses in rec->ip enables looking them up in the kprobe hash table later on to check if they're kprobe'd. Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com> Cc: davem@davemloft.net Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r--arch/x86/kernel/entry_64.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index fe25e5febca..b0f7308f78a 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -51,6 +51,7 @@
#include <asm/page.h>
#include <asm/irqflags.h>
#include <asm/paravirt.h>
+#include <asm/ftrace.h>
.code64
@@ -68,6 +69,7 @@ ENTRY(mcount)
movq %r9, 48(%rsp)
movq 0x38(%rsp), %rdi
+ subq $MCOUNT_INSN_SIZE, %rdi
.globl mcount_call
mcount_call:
@@ -99,6 +101,7 @@ ENTRY(ftrace_caller)
movq 0x38(%rsp), %rdi
movq 8(%rbp), %rsi
+ subq $MCOUNT_INSN_SIZE, %rdi
.globl ftrace_call
ftrace_call:
@@ -139,6 +142,7 @@ trace:
movq 0x38(%rsp), %rdi
movq 8(%rbp), %rsi
+ subq $MCOUNT_INSN_SIZE, %rdi
call *ftrace_trace_function