diff options
author | Abhishek Sagar <sagar.abhishek@gmail.com> | 2008-06-21 14:17:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-23 16:10:56 -0400 |
commit | 395a59d0f8e86bb39cd700c3d185d30c670bb958 (patch) | |
tree | 1558e635efcede901c5dbe9acd625d475db5b369 /arch/x86/kernel/entry_64.S | |
parent | f34bfb1beef8a17ba3d46b60f8fa19ffedc1ed8d (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.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index fe25e5febca3..b0f7308f78a6 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <asm/page.h> | 51 | #include <asm/page.h> |
52 | #include <asm/irqflags.h> | 52 | #include <asm/irqflags.h> |
53 | #include <asm/paravirt.h> | 53 | #include <asm/paravirt.h> |
54 | #include <asm/ftrace.h> | ||
54 | 55 | ||
55 | .code64 | 56 | .code64 |
56 | 57 | ||
@@ -68,6 +69,7 @@ ENTRY(mcount) | |||
68 | movq %r9, 48(%rsp) | 69 | movq %r9, 48(%rsp) |
69 | 70 | ||
70 | movq 0x38(%rsp), %rdi | 71 | movq 0x38(%rsp), %rdi |
72 | subq $MCOUNT_INSN_SIZE, %rdi | ||
71 | 73 | ||
72 | .globl mcount_call | 74 | .globl mcount_call |
73 | mcount_call: | 75 | mcount_call: |
@@ -99,6 +101,7 @@ ENTRY(ftrace_caller) | |||
99 | 101 | ||
100 | movq 0x38(%rsp), %rdi | 102 | movq 0x38(%rsp), %rdi |
101 | movq 8(%rbp), %rsi | 103 | movq 8(%rbp), %rsi |
104 | subq $MCOUNT_INSN_SIZE, %rdi | ||
102 | 105 | ||
103 | .globl ftrace_call | 106 | .globl ftrace_call |
104 | ftrace_call: | 107 | ftrace_call: |
@@ -139,6 +142,7 @@ trace: | |||
139 | 142 | ||
140 | movq 0x38(%rsp), %rdi | 143 | movq 0x38(%rsp), %rdi |
141 | movq 8(%rbp), %rsi | 144 | movq 8(%rbp), %rsi |
145 | subq $MCOUNT_INSN_SIZE, %rdi | ||
142 | 146 | ||
143 | call *ftrace_trace_function | 147 | call *ftrace_trace_function |
144 | 148 | ||