Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212394
b: refs/heads/master
c: 09bfafa
h: refs/heads/master
v: v3
  • Loading branch information
Rabin Vincent authored and Russell King committed Sep 2, 2010
1 parent 07b49ae commit cf32c81
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e9501fdecdee8151938e624b41978307cadddd2
refs/heads/master: 09bfafac3e237415cc4b6adde49f9f28b3a42659
5 changes: 5 additions & 0 deletions trunk/arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ config ARM_UNWIND
the performance is not affected. Currently, this feature
only works with EABI compilers. If unsure say Y.

config OLD_MCOUNT
bool
depends on FUNCTION_TRACER && FRAME_POINTER
default y

config DEBUG_USER
bool "Verbose user fault messages"
help
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/kernel/armksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ EXPORT_SYMBOL(_find_next_bit_be);
#endif

#ifdef CONFIG_FUNCTION_TRACER
#ifdef CONFIG_OLD_MCOUNT
EXPORT_SYMBOL(mcount);
#endif
EXPORT_SYMBOL(__gnu_mcount_nc);
#endif
14 changes: 14 additions & 0 deletions trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ ENDPROC(ret_from_fork)
* allows it to be clobbered in subroutines and doesn't use it to hold
* parameters.)
*/

#ifndef CONFIG_OLD_MCOUNT
#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
#error Ftrace requires CONFIG_FRAME_POINTER=y with GCC older than 4.4.0.
#endif
#endif

#ifdef CONFIG_DYNAMIC_FTRACE
ENTRY(mcount)
stmdb sp!, {r0-r3, lr}
Expand Down Expand Up @@ -173,6 +180,12 @@ gnu_trace:
ldmia sp!, {r0-r3, ip, lr}
mov pc, ip

#ifdef CONFIG_OLD_MCOUNT
/*
* This is under an ifdef in order to force link-time errors for people trying
* to build with !FRAME_POINTER with a GCC which doesn't use the new-style
* mcount.
*/
ENTRY(mcount)
stmdb sp!, {r0-r3, lr}
ldr r0, =ftrace_trace_function
Expand All @@ -191,6 +204,7 @@ trace:
mov pc, r2
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}
#endif

#endif /* CONFIG_DYNAMIC_FTRACE */

Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/trace/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ if FTRACE
config FUNCTION_TRACER
bool "Kernel Function Tracer"
depends on HAVE_FUNCTION_TRACER
select FRAME_POINTER
select FRAME_POINTER if (!ARM_UNWIND)
select KALLSYMS
select GENERIC_TRACER
select CONTEXT_SWITCH_TRACER
Expand Down

0 comments on commit cf32c81

Please sign in to comment.