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/powerpc/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/powerpc/kernel/entry_64.S')
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 2c4d9e056ead..2f511a969d2c 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/bug.h> | 31 | #include <asm/bug.h> |
32 | #include <asm/ptrace.h> | 32 | #include <asm/ptrace.h> |
33 | #include <asm/irqflags.h> | 33 | #include <asm/irqflags.h> |
34 | #include <asm/ftrace.h> | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * System calls. | 37 | * System calls. |
@@ -879,6 +880,7 @@ _GLOBAL(_mcount) | |||
879 | mflr r3 | 880 | mflr r3 |
880 | stdu r1, -112(r1) | 881 | stdu r1, -112(r1) |
881 | std r3, 128(r1) | 882 | std r3, 128(r1) |
883 | subi r3, r3, MCOUNT_INSN_SIZE | ||
882 | .globl mcount_call | 884 | .globl mcount_call |
883 | mcount_call: | 885 | mcount_call: |
884 | bl ftrace_stub | 886 | bl ftrace_stub |
@@ -895,6 +897,7 @@ _GLOBAL(ftrace_caller) | |||
895 | stdu r1, -112(r1) | 897 | stdu r1, -112(r1) |
896 | std r3, 128(r1) | 898 | std r3, 128(r1) |
897 | ld r4, 16(r11) | 899 | ld r4, 16(r11) |
900 | subi r3, r3, MCOUNT_INSN_SIZE | ||
898 | .globl ftrace_call | 901 | .globl ftrace_call |
899 | ftrace_call: | 902 | ftrace_call: |
900 | bl ftrace_stub | 903 | bl ftrace_stub |
@@ -916,7 +919,7 @@ _GLOBAL(_mcount) | |||
916 | std r3, 128(r1) | 919 | std r3, 128(r1) |
917 | ld r4, 16(r11) | 920 | ld r4, 16(r11) |
918 | 921 | ||
919 | 922 | subi r3, r3, MCOUNT_INSN_SIZE | |
920 | LOAD_REG_ADDR(r5,ftrace_trace_function) | 923 | LOAD_REG_ADDR(r5,ftrace_trace_function) |
921 | ld r5,0(r5) | 924 | ld r5,0(r5) |
922 | ld r5,0(r5) | 925 | ld r5,0(r5) |