public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] tracing/function-return-tracer: Call prepare_ftrace_return by registers
Date: Wed, 12 Nov 2008 22:49:23 +0100	[thread overview]
Message-ID: <491B4F63.3090909@gmail.com> (raw)

Impact: Optimize a bit the function return tracer

This patch changes the calling convention of prepare_ftrace_return
to pass its arguments by register. This will optimize it a bit and
prepare it to support dynamic tracing.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
 arch/x86/kernel/entry_32.S |    5 +----
 arch/x86/kernel/ftrace.c   |    1 -
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 9a0ac85..f976211 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1217,12 +1217,9 @@ trace_return:
 	pushl %eax
 	pushl %ecx
 	pushl %edx
-	movl 0xc(%esp), %eax
-	pushl %eax
+	movl 0xc(%esp), %edx
 	lea 0x4(%ebp), %eax
-	pushl %eax
 	call prepare_ftrace_return
-	addl $8, %esp
 	popl %edx
 	popl %ecx
 	popl %eax
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 1db0e12..fe83273 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -95,7 +95,6 @@ unsigned long ftrace_return_to_handler(void)
  * Hook the return address and push it in the stack of return addrs
  * in current thread info.
  */
-asmlinkage
 void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
 {
 	unsigned long old;
-- 
1.5.2.5

             reply	other threads:[~2008-11-12 21:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 21:49 Frederic Weisbecker [this message]
2008-11-12 22:16 ` [PATCH 2/2] tracing/function-return-tracer: Call prepare_ftrace_return by registers Ingo Molnar
2008-11-12 22:22   ` Frédéric Weisbecker
2008-11-12 23:25     ` Steven Rostedt
2008-11-12 23:35       ` Frédéric Weisbecker
2008-11-13  0:11         ` Steven Rostedt
2008-11-13  8:59           ` Ingo Molnar
2008-11-13  9:14             ` Ingo Molnar
2008-11-13 10:02               ` Frédéric Weisbecker
2008-11-13 10:09                 ` Ingo Molnar
2008-11-13 23:48                   ` Frédéric Weisbecker
2008-11-13  9:38             ` Frédéric Weisbecker
2008-11-13  9:40               ` Frédéric Weisbecker
2008-11-13  9:44               ` Ingo Molnar
2008-11-17 18:58                 ` Frederic Weisbecker

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=491B4F63.3090909@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /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