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>
Cette révision appartient à :

révisé par
Ingo Molnar

Parent
f34bfb1bee
révision
395a59d0f8
@@ -31,6 +31,7 @@
|
||||
#include <asm/bug.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/irqflags.h>
|
||||
#include <asm/ftrace.h>
|
||||
|
||||
/*
|
||||
* System calls.
|
||||
@@ -879,6 +880,7 @@ _GLOBAL(_mcount)
|
||||
mflr r3
|
||||
stdu r1, -112(r1)
|
||||
std r3, 128(r1)
|
||||
subi r3, r3, MCOUNT_INSN_SIZE
|
||||
.globl mcount_call
|
||||
mcount_call:
|
||||
bl ftrace_stub
|
||||
@@ -895,6 +897,7 @@ _GLOBAL(ftrace_caller)
|
||||
stdu r1, -112(r1)
|
||||
std r3, 128(r1)
|
||||
ld r4, 16(r11)
|
||||
subi r3, r3, MCOUNT_INSN_SIZE
|
||||
.globl ftrace_call
|
||||
ftrace_call:
|
||||
bl ftrace_stub
|
||||
@@ -916,7 +919,7 @@ _GLOBAL(_mcount)
|
||||
std r3, 128(r1)
|
||||
ld r4, 16(r11)
|
||||
|
||||
|
||||
subi r3, r3, MCOUNT_INSN_SIZE
|
||||
LOAD_REG_ADDR(r5,ftrace_trace_function)
|
||||
ld r5,0(r5)
|
||||
ld r5,0(r5)
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur