public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux kernel <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Tim Bird <tim.bird@am.sony.com>, Ingo Molnar <mingo@redhat.com>,
	Abhishek Sagar <sagar.abhishek@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH][GIT PULL] x86, function-graph: only save return values on x86_64
Date: Wed, 8 Apr 2009 18:09:15 +0200	[thread overview]
Message-ID: <20090408160915.GD16759@elte.hu> (raw)
In-Reply-To: <alpine.DEB.2.00.0903251625490.5675@gandalf.stny.rr.com>


(replying to old mail - working down my awful email backlog)

do we still need this for -tip?

	Ingo

* Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> Ingo,
> 
> Please pull the latest tip/tracing/function-graph tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/function-graph
> 
> 
> Steven Rostedt (1):
>       x86, function-graph: only save return values on x86_64
> 
> ----
>  arch/x86/kernel/entry_64.S |   19 +++----------------
>  1 files changed, 3 insertions(+), 16 deletions(-)
> ---------------------------
> commit d5b754b2208b1c22691a7cd5d1a65398b5973d74
> Author: Steven Rostedt <srostedt@redhat.com>
> Date:   Wed Mar 25 14:30:04 2009 -0400
> 
>     x86, function-graph: only save return values on x86_64
>     
>     Impact: speed up
>     
>     The return to handler portion of the function graph tracer should only
>     need to save the return values. The caller already saved off the
>     registers that the callee can modify. The returning function already
>     saved the registers it modified. When we call our own trace function
>     it too will save the registers that the callee must restore.
>     
>     There's no reason to save off anything more that the registers used
>     to return the values.
>     
>     Note, I did a complete kernel build with this modification and the
>     function graph tracer running on x86_64.
>     
>     Signed-off-by: Steven Rostedt <srostedt@redhat.com>
> 
> diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
> index a331ec3..1ac9986 100644
> --- a/arch/x86/kernel/entry_64.S
> +++ b/arch/x86/kernel/entry_64.S
> @@ -147,27 +147,14 @@ END(ftrace_graph_caller)
>  GLOBAL(return_to_handler)
>  	subq  $80, %rsp
>  
> +	/* Save the return values */
>  	movq %rax, (%rsp)
> -	movq %rcx, 8(%rsp)
> -	movq %rdx, 16(%rsp)
> -	movq %rsi, 24(%rsp)
> -	movq %rdi, 32(%rsp)
> -	movq %r8, 40(%rsp)
> -	movq %r9, 48(%rsp)
> -	movq %r10, 56(%rsp)
> -	movq %r11, 64(%rsp)
> +	movq %rdx, 8(%rsp)
>  
>  	call ftrace_return_to_handler
>  
>  	movq %rax, 72(%rsp)
> -	movq 64(%rsp), %r11
> -	movq 56(%rsp), %r10
> -	movq 48(%rsp), %r9
> -	movq 40(%rsp), %r8
> -	movq 32(%rsp), %rdi
> -	movq 24(%rsp), %rsi
> -	movq 16(%rsp), %rdx
> -	movq 8(%rsp), %rcx
> +	movq 8(%rsp), %rdx
>  	movq (%rsp), %rax
>  	addq $72, %rsp
>  	retq

  parent reply	other threads:[~2009-04-08 16:09 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 19:38 Anyone working on ftrace function graph support on ARM? Tim Bird
2009-03-24 20:25 ` Ingo Molnar
2009-03-24 20:48   ` Tim Bird
2009-03-24 20:38 ` Uwe Kleine-König
2009-03-24 21:36 ` Frederic Weisbecker
2009-03-24 21:40   ` Tim Bird
2009-03-24 21:48   ` Ingo Molnar
2009-03-24 21:57     ` Frederic Weisbecker
2009-03-24 22:14       ` Ingo Molnar
2009-03-24 22:54         ` Frederic Weisbecker
2009-03-25  8:36         ` Russell King - ARM Linux
2009-03-25 16:00       ` Steven Rostedt
2009-03-25 17:13         ` Frederic Weisbecker
2009-03-25 20:27         ` [PATCH][GIT PULL] x86, function-graph: only save return values on x86_64 Steven Rostedt
2009-03-25 20:45           ` Jaswinder Singh Rajput
2009-03-25 21:26             ` Steven Rostedt
2009-04-08 16:09           ` Ingo Molnar [this message]
2009-04-08 16:37             ` Steven Rostedt
2009-04-08 16:41               ` Ingo Molnar
2009-04-08 17:40             ` Frederic Weisbecker
2009-03-24 22:29   ` Anyone working on ftrace function graph support on ARM? Abhishek Sagar
2009-03-24 22:48     ` Frederic Weisbecker
2009-03-25  8:42       ` Russell King - ARM Linux
2009-03-25  8:54         ` Ingo Molnar
2009-03-25  9:57           ` Russell King - ARM Linux
2009-03-25 10:45             ` Uwe Kleine-König
2009-03-25 11:21               ` Russell King - ARM Linux
2009-03-25 12:09                 ` Uwe Kleine-König
2009-03-25 16:41           ` Tim Bird
2009-03-25 11:41         ` Frederic Weisbecker
2009-03-25 16:34         ` Tim Bird
2009-03-25 17:05           ` Uwe Kleine-König
2009-03-25 17:17             ` Russell King - ARM Linux
2009-03-25 18:37               ` Tim Bird
2009-03-25 18:41                 ` Steven Rostedt
2009-03-27 12:58           ` Catalin Marinas
2009-04-09 15:29             ` Daniel Jacobowitz

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=20090408160915.GD16759@elte.hu \
    --to=mingo@elte.hu \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sagar.abhishek@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tim.bird@am.sony.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