Re: [PATCH] ftrace/x86: Fix function graph tracer reset path

From: Matt Fleming
Date: Mon May 16 2016 - 15:52:44 EST


On Mon, 16 May, at 09:58:33AM, Steven Rostedt wrote:
>
> Can we solve this by doing the same thing it did for the kernel?
>
> -- Steve
>
> diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
> index ed48a9f465f8..e13a695c3084 100644
> --- a/arch/x86/kernel/mcount_64.S
> +++ b/arch/x86/kernel/mcount_64.S
> @@ -182,7 +182,8 @@ GLOBAL(ftrace_graph_call)
> jmp ftrace_stub
> #endif
>
> -GLOBAL(ftrace_stub)
> +/* This is weak to keep gas from relaxing the jumps */
> +WEAK(ftrace_stub)
> retq
> END(ftrace_caller)

Works for me.

Tested-by: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx>