aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/entry_32.S
diff options
context:
space:
mode:
authorAbhishek Sagar <sagar.abhishek@gmail.com>2008-06-21 14:17:27 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-23 16:10:56 -0400
commit395a59d0f8e86bb39cd700c3d185d30c670bb958 (patch)
tree1558e635efcede901c5dbe9acd625d475db5b369 /arch/x86/kernel/entry_32.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_32.S')
-rw-r--r--arch/x86/kernel/entry_32.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 04ea83ccb979..95e6bbe3665e 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -51,6 +51,7 @@
51#include <asm/percpu.h> 51#include <asm/percpu.h>
52#include <asm/dwarf2.h> 52#include <asm/dwarf2.h>
53#include <asm/processor-flags.h> 53#include <asm/processor-flags.h>
54#include <asm/ftrace.h>
54#include "irq_vectors.h" 55#include "irq_vectors.h"
55 56
56/* 57/*
@@ -1118,6 +1119,7 @@ ENTRY(mcount)
1118 pushl %ecx 1119 pushl %ecx
1119 pushl %edx 1120 pushl %edx
1120 movl 0xc(%esp), %eax 1121 movl 0xc(%esp), %eax
1122 subl $MCOUNT_INSN_SIZE, %eax
1121 1123
1122.globl mcount_call 1124.globl mcount_call
1123mcount_call: 1125mcount_call:
@@ -1136,6 +1138,7 @@ ENTRY(ftrace_caller)
1136 pushl %edx 1138 pushl %edx
1137 movl 0xc(%esp), %eax 1139 movl 0xc(%esp), %eax
1138 movl 0x4(%ebp), %edx 1140 movl 0x4(%ebp), %edx
1141 subl $MCOUNT_INSN_SIZE, %eax
1139 1142
1140.globl ftrace_call 1143.globl ftrace_call
1141ftrace_call: 1144ftrace_call:
@@ -1166,6 +1169,7 @@ trace:
1166 pushl %edx 1169 pushl %edx
1167 movl 0xc(%esp), %eax 1170 movl 0xc(%esp), %eax
1168 movl 0x4(%ebp), %edx 1171 movl 0x4(%ebp), %edx
1172 subl $MCOUNT_INSN_SIZE, %eax
1169 1173
1170 call *ftrace_trace_function 1174 call *ftrace_trace_function
1171 1175