mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, "Ingo Molnar" <mingo@elte.hu>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Steven Rostedt" <srostedt@redhat.com>
Subject: Re: [PATCH 2/3] ftrace: use code patching for ftrace return tracer
Date: Wed, 26 Nov 2008 01:13:04 +0100	[thread overview]
Message-ID: <c62985530811251613n4c328b29od6d6cee2bfb9341@mail.gmail.com> (raw)
In-Reply-To: <20081125223457.162461633@goodmis.org>

2008/11/25 Steven Rostedt <rostedt@goodmis.org>:
> From: Steven Rostedt <rostedt@goodmis.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@redhat.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@gmail.com>

  reply	other threads:[~2008-11-26  0:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 22:34 [PATCH 0/3] ftrace: new features Steven Rostedt
2008-11-25 22:34 ` [PATCH 1/3] ftrace: add function tracing to single thread Steven Rostedt
2008-11-25 22:42   ` Andrew Morton
2008-11-25 23:01     ` Steven Rostedt
2008-11-25 23:31       ` Andrew Morton
2008-11-26  0:11         ` Steven Rostedt
2008-11-26  0:53           ` Dave Hansen
2008-11-26  1:01             ` Steven Rostedt
2008-11-26  4:50               ` Eric W. Biederman
2008-11-26  5:01                 ` Steven Rostedt
2008-11-26  6:23                   ` Eric W. Biederman
2008-11-26  6:32                     ` Ingo Molnar
2008-11-26  7:02                       ` Eric W. Biederman
2008-11-26  7:18                         ` Ingo Molnar
2008-11-26  8:48                           ` Eric W. Biederman
2008-11-26  5:20               ` Eric W. Biederman
2008-11-26 16:36                 ` Steven Rostedt
2008-11-26  0:02   ` Frédéric Weisbecker
2008-11-26  0:16     ` Steven Rostedt
2008-11-25 22:34 ` [PATCH 2/3] ftrace: use code patching for ftrace return tracer Steven Rostedt
2008-11-26  0:13   ` Frédéric Weisbecker [this message]
2008-11-26  0:23   ` Steven Rostedt
2008-11-25 22:34 ` [PATCH 3/3] ftrace: let function tracing and function return run together Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c62985530811251613n4c328b29od6d6cee2bfb9341@mail.gmail.com \
    --to=fweisbec@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=srostedt@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®