mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tracing: stack allocation fix
@ 2009-07-29  8:58 Jiri Olsa
  2009-07-29 13:27 ` Steven Rostedt
  2009-09-13 15:02 ` [tip:tracing/core] tracing/function-graph: x86_64 stack allocation cleanup tip-bot for Jiri Olsa
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Olsa @ 2009-07-29  8:58 UTC (permalink / raw)
  To: Ingo Molnar, Steven Rostedt; +Cc: lkml

Only 24 bytes need to be allocated.

I believe this was missed in following commit:
x86, function-graph: only save return values on x86_64
commit e71e99c294058a61b7a8b9bb6da2f745ac51aa4f

wbr,
jirka


Signed-off-by: Jiri Olsa <jolsa@redhat.com>

---
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index c251be7..d59fe32 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -146,7 +146,7 @@ ENTRY(ftrace_graph_caller)
 END(ftrace_graph_caller)
 
 GLOBAL(return_to_handler)
-	subq  $80, %rsp
+	subq  $24, %rsp
 
 	/* Save the return values */
 	movq %rax, (%rsp)
@@ -155,10 +155,10 @@ GLOBAL(return_to_handler)
 
 	call ftrace_return_to_handler
 
-	movq %rax, 72(%rsp)
+	movq %rax, 16(%rsp)
 	movq 8(%rsp), %rdx
 	movq (%rsp), %rax
-	addq $72, %rsp
+	addq $16, %rsp
 	retq
 #endif
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tracing: stack allocation fix
  2009-07-29  8:58 [PATCH] tracing: stack allocation fix Jiri Olsa
@ 2009-07-29 13:27 ` Steven Rostedt
  2009-09-13 15:02 ` [tip:tracing/core] tracing/function-graph: x86_64 stack allocation cleanup tip-bot for Jiri Olsa
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2009-07-29 13:27 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Ingo Molnar, lkml


On Wed, 29 Jul 2009, Jiri Olsa wrote:

> Only 24 bytes need to be allocated.
> 
> I believe this was missed in following commit:
> x86, function-graph: only save return values on x86_64
> commit e71e99c294058a61b7a8b9bb6da2f745ac51aa4f

I was just being paranoid again. But it still worked. I'll take this patch 
as a clean up.

Thanks!

-- Steve


> 
> wbr,
> jirka
> 
> 
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> 
> ---
> diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
> index c251be7..d59fe32 100644
> --- a/arch/x86/kernel/entry_64.S
> +++ b/arch/x86/kernel/entry_64.S
> @@ -146,7 +146,7 @@ ENTRY(ftrace_graph_caller)
>  END(ftrace_graph_caller)
>  
>  GLOBAL(return_to_handler)
> -	subq  $80, %rsp
> +	subq  $24, %rsp
>  
>  	/* Save the return values */
>  	movq %rax, (%rsp)
> @@ -155,10 +155,10 @@ GLOBAL(return_to_handler)
>  
>  	call ftrace_return_to_handler
>  
> -	movq %rax, 72(%rsp)
> +	movq %rax, 16(%rsp)
>  	movq 8(%rsp), %rdx
>  	movq (%rsp), %rax
> -	addq $72, %rsp
> +	addq $16, %rsp
>  	retq
>  #endif
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:tracing/core] tracing/function-graph: x86_64 stack allocation cleanup
  2009-07-29  8:58 [PATCH] tracing: stack allocation fix Jiri Olsa
  2009-07-29 13:27 ` Steven Rostedt
@ 2009-09-13 15:02 ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jiri Olsa @ 2009-09-13 15:02 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, tglx, jolsa

Commit-ID:  4818d80942b7c0021d213b7c5f1a14a832820a01
Gitweb:     http://git.kernel.org/tip/4818d80942b7c0021d213b7c5f1a14a832820a01
Author:     Jiri Olsa <jolsa@redhat.com>
AuthorDate: Wed, 29 Jul 2009 10:58:37 +0200
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Sat, 12 Sep 2009 22:13:43 -0400

tracing/function-graph: x86_64 stack allocation cleanup

Only 24 bytes needs to be reserved on the stack for the function graph
tracer on x86_64.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
LKML-Reference: <20090729085837.GB4998@jolsa.lab.eng.brq.redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>


---
 arch/x86/kernel/entry_64.S |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index c251be7..d59fe32 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -146,7 +146,7 @@ ENTRY(ftrace_graph_caller)
 END(ftrace_graph_caller)
 
 GLOBAL(return_to_handler)
-	subq  $80, %rsp
+	subq  $24, %rsp
 
 	/* Save the return values */
 	movq %rax, (%rsp)
@@ -155,10 +155,10 @@ GLOBAL(return_to_handler)
 
 	call ftrace_return_to_handler
 
-	movq %rax, 72(%rsp)
+	movq %rax, 16(%rsp)
 	movq 8(%rsp), %rdx
 	movq (%rsp), %rax
-	addq $72, %rsp
+	addq $16, %rsp
 	retq
 #endif
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-13 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-29  8:58 [PATCH] tracing: stack allocation fix Jiri Olsa
2009-07-29 13:27 ` Steven Rostedt
2009-09-13 15:02 ` [tip:tracing/core] tracing/function-graph: x86_64 stack allocation cleanup tip-bot for Jiri Olsa

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®