[PATCH 08/10] ARM: ftrace: fix and update dynamic ftrace
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Sun Feb 14 06:08:40 EST 2010
Hello,
On Sun, Feb 14, 2010 at 01:18:36AM +0530, Rabin Vincent wrote:
> This adds mcount recording and updates dynamic ftrace for ARM to work
> with the new ftrace dyamic tracing implementation. It also adds support
> for the mcount format used by newer ARM compilers.
>
> With dynamic tracing, mcount() is implemented as a nop. Callsites are
> patched on startup with nops, and dynamically patched to call to the
> ftrace_caller() routine as needed.
>
> Signed-off-by: Rabin Vincent <rabin at rab.in>
> ---
> arch/arm/include/asm/ftrace.h | 19 +++++-
> arch/arm/kernel/entry-common.S | 37 +++++++---
> arch/arm/kernel/ftrace.c | 155 +++++++++++++++++++++++++++------------
> scripts/recordmcount.pl | 2 +
> 4 files changed, 155 insertions(+), 58 deletions(-)
>
> diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
> index 103f7ee..4a56a2e 100644
> --- a/arch/arm/include/asm/ftrace.h
> +++ b/arch/arm/include/asm/ftrace.h
> @@ -2,12 +2,29 @@
> #define _ASM_ARM_FTRACE
>
> #ifdef CONFIG_FUNCTION_TRACER
> -#define MCOUNT_ADDR ((long)(mcount))
> +#define MCOUNT_ADDR ((unsigned long)(__gnu_mcount_nc))
hhmm, does this work with both the old and the new mcount function?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the linux-arm-kernel
mailing list