Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 160904
b: refs/heads/master
c: 181f817
h: refs/heads/master
v: v3
  • Loading branch information
Uwe Kleine-König committed Aug 13, 2009
1 parent 7adad5f commit 830f70d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b88fb83b138d4a377abea9461b2d58b9bf8ad9fe
refs/heads/master: 181f817eaaca4c1f8a9c265d339d2b96de8b245d
1 change: 1 addition & 0 deletions trunk/arch/arm/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#ifndef __ASSEMBLY__
extern void mcount(void);
extern void __gnu_mcount_nc(void);
#endif

#endif
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/kernel/armksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,5 @@ EXPORT_SYMBOL(_find_next_bit_be);

#ifdef CONFIG_FUNCTION_TRACER
EXPORT_SYMBOL(mcount);
EXPORT_SYMBOL(__gnu_mcount_nc);
#endif
19 changes: 19 additions & 0 deletions trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,25 @@ ftrace_call:

#else

ENTRY(__gnu_mcount_nc)
stmdb sp!, {r0-r3, lr}
ldr r0, =ftrace_trace_function
ldr r2, [r0]
adr r0, ftrace_stub
cmp r0, r2
bne gnu_trace
ldmia sp!, {r0-r3, ip, lr}
bx ip

gnu_trace:
ldr r1, [sp, #20] @ lr of instrumented routine
mov r0, lr
sub r0, r0, #MCOUNT_INSN_SIZE
mov lr, pc
mov pc, r2
ldmia sp!, {r0-r3, ip, lr}
bx ip

ENTRY(mcount)
stmdb sp!, {r0-r3, lr}
ldr r0, =ftrace_trace_function
Expand Down

0 comments on commit 830f70d

Please sign in to comment.