[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c62985530811251613n4c328b29od6d6cee2bfb9341@mail.gmail.com>
Date: Wed, 26 Nov 2008 01:13:04 +0100
From: "Frédéric Weisbecker" <fweisbec@...il.com>
To: "Steven Rostedt" <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, "Ingo Molnar" <mingo@...e.hu>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Steven Rostedt" <srostedt@...hat.com>
Subject: Re: [PATCH 2/3] ftrace: use code patching for ftrace return tracer
2008/11/25 Steven Rostedt <rostedt@...dmis.org>:
> From: Steven Rostedt <rostedt@...dmis.org>
>
> Impact: more efficient code for ftrace return tracer
>
> This patch uses the dynamic patching, when available, to patch
> the function return code into the kernel.
>
> This patch will ease the way for letting both function tracing
> and function return tracing run together.
>
> Signed-off-by: Steven Rostedt <srostedt@...hat.com>
> ---
> arch/x86/kernel/entry_32.S | 5 ++++
> arch/x86/kernel/ftrace.c | 46 +++++++++++++++++++++++++++++++++++++++++++-
> include/linux/ftrace.h | 5 ++++
> kernel/trace/ftrace.c | 34 ++++++++++++++------------------
> 4 files changed, 70 insertions(+), 20 deletions(-)
>
> diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
> index 7a934c0..d6f0333 100644
> --- a/arch/x86/kernel/entry_32.S
> +++ b/arch/x86/kernel/entry_32.S
> @@ -1185,6 +1185,11 @@ ftrace_call:
> popl %edx
> popl %ecx
> popl %eax
> +#ifdef CONFIG_FUNCTION_RET_TRACER
> +.globl ftrace_return_call
> +ftrace_return_call:
> + jmp ftrace_stub
> +#endif
And you patch ftrace_stub to ftrace_return_caller.
I see...
Seems a good idea :-)
Acked-by: Frederic Weisbecker <fweisbec@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists