diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2009-08-13 22:38:16 +0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2009-08-13 22:34:36 +0400 |
commit | 181f817eaaca4c1f8a9c265d339d2b96de8b245d (patch) | |
tree | 44572f3be32f89ee7afbf4495fae12ad234ab6ae /arch/arm/kernel/entry-common.S | |
parent | b88fb83b138d4a377abea9461b2d58b9bf8ad9fe (diff) | |
download | linux-181f817eaaca4c1f8a9c265d339d2b96de8b245d.tar.xz |
[ARM] support tracing when using newer compilers
Since gcc 4.4 the name and calling convention for function profiling
on ARM changed. With this patch both types are supported.
See http://sourceware.org/ml/libc-ports/2008-04/msg00009.html for some
details.
Lightly-Tested-by: Anand Gadiyar <gadiyar@ti.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r-- | arch/arm/kernel/entry-common.S | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 366e5097a41a..99208728d48f 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -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 |