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/arm/kernel/entry-common.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/arm/kernel/entry-common.S')
-rw-r--r-- | arch/arm/kernel/entry-common.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 8f79a4789ed..84694e88b42 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/unistd.h> | 11 | #include <asm/unistd.h> |
12 | #include <asm/ftrace.h> | ||
12 | #include <asm/arch/entry-macro.S> | 13 | #include <asm/arch/entry-macro.S> |
13 | 14 | ||
14 | #include "entry-header.S" | 15 | #include "entry-header.S" |
@@ -104,6 +105,7 @@ ENTRY(ret_from_fork) | |||
104 | ENTRY(mcount) | 105 | ENTRY(mcount) |
105 | stmdb sp!, {r0-r3, lr} | 106 | stmdb sp!, {r0-r3, lr} |
106 | mov r0, lr | 107 | mov r0, lr |
108 | sub r0, r0, #MCOUNT_INSN_SIZE | ||
107 | 109 | ||
108 | .globl mcount_call | 110 | .globl mcount_call |
109 | mcount_call: | 111 | mcount_call: |
@@ -114,6 +116,7 @@ ENTRY(ftrace_caller) | |||
114 | stmdb sp!, {r0-r3, lr} | 116 | stmdb sp!, {r0-r3, lr} |
115 | ldr r1, [fp, #-4] | 117 | ldr r1, [fp, #-4] |
116 | mov r0, lr | 118 | mov r0, lr |
119 | sub r0, r0, #MCOUNT_INSN_SIZE | ||
117 | 120 | ||
118 | .globl ftrace_call | 121 | .globl ftrace_call |
119 | ftrace_call: | 122 | ftrace_call: |
@@ -134,6 +137,7 @@ ENTRY(mcount) | |||
134 | trace: | 137 | trace: |
135 | ldr r1, [fp, #-4] | 138 | ldr r1, [fp, #-4] |
136 | mov r0, lr | 139 | mov r0, lr |
140 | sub r0, r0, #MCOUNT_INSN_SIZE | ||
137 | mov lr, pc | 141 | mov lr, pc |
138 | mov pc, r2 | 142 | mov pc, r2 |
139 | ldmia sp!, {r0-r3, pc} | 143 | ldmia sp!, {r0-r3, pc} |