* [PATCH] tracing/trace_stack: Fix stack trace on ppc64
@ 2010-08-25 1:32 Anton Blanchard
2010-08-25 12:58 ` [tip:perf/urgent] " tip-bot for Anton Blanchard
2010-08-31 1:31 ` [PATCH] " Steven Rostedt
0 siblings, 2 replies; 7+ messages in thread
From: Anton Blanchard @ 2010-08-25 1:32 UTC (permalink / raw)
To: rostedt, fweisbec, mingo; +Cc: linux-kernel
save_stack_trace() stores the instruction pointer, not the function
descriptor. On ppc64 the trace stack code currently dereferences the
instruction pointer and shows 8 bytes of instructions in our backtraces:
# cat /sys/kernel/debug/tracing/stack_trace
Depth Size Location (26 entries)
----- ---- --------
0) 5424 112 0x6000000048000004
1) 5312 160 0x60000000ebad01b0
2) 5152 160 0x2c23000041c20030
3) 4992 240 0x600000007c781b79
4) 4752 160 0xe84100284800000c
5) 4592 192 0x600000002fa30000
6) 4400 256 0x7f1800347b7407e0
7) 4144 208 0xe89f0108f87f0070
8) 3936 272 0xe84100282fa30000
Since we aren't dealing with function descriptors, use %pS instead of %pF
to fix it:
# cat /sys/kernel/debug/tracing/stack_trace
Depth Size Location (26 entries)
----- ---- --------
0) 5424 112 ftrace_call+0x4/0x8
1) 5312 160 .current_io_context+0x28/0x74
2) 5152 160 .get_io_context+0x48/0xa0
3) 4992 240 .cfq_set_request+0x94/0x4c4
4) 4752 160 .elv_set_request+0x60/0x84
5) 4592 192 .get_request+0x2d4/0x468
6) 4400 256 .get_request_wait+0x7c/0x258
7) 4144 208 .__make_request+0x49c/0x610
8) 3936 272 .generic_make_request+0x390/0x434
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: powerpc.git/kernel/trace/trace_stack.c
===================================================================
--- powerpc.git.orig/kernel/trace/trace_stack.c 2010-08-25 11:03:52.337982567 +1000
+++ powerpc.git/kernel/trace/trace_stack.c 2010-08-25 11:03:55.018371055 +1000
@@ -249,7 +249,7 @@ static int trace_lookup_stack(struct seq
{
unsigned long addr = stack_dump_trace[i];
- return seq_printf(m, "%pF\n", (void *)addr);
+ return seq_printf(m, "%pS\n", (void *)addr);
}
static void print_disabled(struct seq_file *m)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [tip:perf/urgent] tracing/trace_stack: Fix stack trace on ppc64
2010-08-25 1:32 [PATCH] tracing/trace_stack: Fix stack trace on ppc64 Anton Blanchard
@ 2010-08-25 12:58 ` tip-bot for Anton Blanchard
2010-08-31 1:31 ` [PATCH] " Steven Rostedt
1 sibling, 0 replies; 7+ messages in thread
From: tip-bot for Anton Blanchard @ 2010-08-25 12:58 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, anton, hpa, mingo, tglx, mingo
Commit-ID: 151772dbfad4dbe81721e40f9b3d588ea77bb7aa
Gitweb: http://git.kernel.org/tip/151772dbfad4dbe81721e40f9b3d588ea77bb7aa
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 25 Aug 2010 11:32:38 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 25 Aug 2010 13:08:48 +0200
tracing/trace_stack: Fix stack trace on ppc64
save_stack_trace() stores the instruction pointer, not the
function descriptor. On ppc64 the trace stack code currently
dereferences the instruction pointer and shows 8 bytes of
instructions in our backtraces:
# cat /sys/kernel/debug/tracing/stack_trace
Depth Size Location (26 entries)
----- ---- --------
0) 5424 112 0x6000000048000004
1) 5312 160 0x60000000ebad01b0
2) 5152 160 0x2c23000041c20030
3) 4992 240 0x600000007c781b79
4) 4752 160 0xe84100284800000c
5) 4592 192 0x600000002fa30000
6) 4400 256 0x7f1800347b7407e0
7) 4144 208 0xe89f0108f87f0070
8) 3936 272 0xe84100282fa30000
Since we aren't dealing with function descriptors, use %pS
instead of %pF to fix it:
# cat /sys/kernel/debug/tracing/stack_trace
Depth Size Location (26 entries)
----- ---- --------
0) 5424 112 ftrace_call+0x4/0x8
1) 5312 160 .current_io_context+0x28/0x74
2) 5152 160 .get_io_context+0x48/0xa0
3) 4992 240 .cfq_set_request+0x94/0x4c4
4) 4752 160 .elv_set_request+0x60/0x84
5) 4592 192 .get_request+0x2d4/0x468
6) 4400 256 .get_request_wait+0x7c/0x258
7) 4144 208 .__make_request+0x49c/0x610
8) 3936 272 .generic_make_request+0x390/0x434
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: rostedt@goodmis.org
Cc: fweisbec@gmail.com
LKML-Reference: <20100825013238.GE28360@kryten>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/trace_stack.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index 056468e..a6b7e0e 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -249,7 +249,7 @@ static int trace_lookup_stack(struct seq_file *m, long i)
{
unsigned long addr = stack_dump_trace[i];
- return seq_printf(m, "%pF\n", (void *)addr);
+ return seq_printf(m, "%pS\n", (void *)addr);
}
static void print_disabled(struct seq_file *m)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] tracing/trace_stack: Fix stack trace on ppc64
2010-08-25 1:32 [PATCH] tracing/trace_stack: Fix stack trace on ppc64 Anton Blanchard
2010-08-25 12:58 ` [tip:perf/urgent] " tip-bot for Anton Blanchard
@ 2010-08-31 1:31 ` Steven Rostedt
2010-08-31 14:21 ` Frederic Weisbecker
1 sibling, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2010-08-31 1:31 UTC (permalink / raw)
To: Anton Blanchard; +Cc: fweisbec, mingo, linux-kernel
On Wed, 2010-08-25 at 11:32 +1000, Anton Blanchard wrote:
> save_stack_trace() stores the instruction pointer, not the function
> descriptor. On ppc64 the trace stack code currently dereferences the
> instruction pointer and shows 8 bytes of instructions in our backtraces:
>
> # cat /sys/kernel/debug/tracing/stack_trace
> Depth Size Location (26 entries)
> ----- ---- --------
> 0) 5424 112 0x6000000048000004
> 1) 5312 160 0x60000000ebad01b0
> 2) 5152 160 0x2c23000041c20030
> 3) 4992 240 0x600000007c781b79
> 4) 4752 160 0xe84100284800000c
> 5) 4592 192 0x600000002fa30000
> 6) 4400 256 0x7f1800347b7407e0
> 7) 4144 208 0xe89f0108f87f0070
> 8) 3936 272 0xe84100282fa30000
>
> Since we aren't dealing with function descriptors, use %pS instead of %pF
> to fix it:
>
> # cat /sys/kernel/debug/tracing/stack_trace
> Depth Size Location (26 entries)
> ----- ---- --------
> 0) 5424 112 ftrace_call+0x4/0x8
> 1) 5312 160 .current_io_context+0x28/0x74
> 2) 5152 160 .get_io_context+0x48/0xa0
> 3) 4992 240 .cfq_set_request+0x94/0x4c4
> 4) 4752 160 .elv_set_request+0x60/0x84
> 5) 4592 192 .get_request+0x2d4/0x468
> 6) 4400 256 .get_request_wait+0x7c/0x258
> 7) 4144 208 .__make_request+0x49c/0x610
> 8) 3936 272 .generic_make_request+0x390/0x434
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
Thanks, I'll test this to make sure it doesn't break x86, and then push
it into a stable/-rc patch queue.
-- Steve
> ---
>
> Index: powerpc.git/kernel/trace/trace_stack.c
> ===================================================================
> --- powerpc.git.orig/kernel/trace/trace_stack.c 2010-08-25 11:03:52.337982567 +1000
> +++ powerpc.git/kernel/trace/trace_stack.c 2010-08-25 11:03:55.018371055 +1000
> @@ -249,7 +249,7 @@ static int trace_lookup_stack(struct seq
> {
> unsigned long addr = stack_dump_trace[i];
>
> - return seq_printf(m, "%pF\n", (void *)addr);
> + return seq_printf(m, "%pS\n", (void *)addr);
> }
>
> static void print_disabled(struct seq_file *m)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tracing/trace_stack: Fix stack trace on ppc64
2010-08-31 1:31 ` [PATCH] " Steven Rostedt
@ 2010-08-31 14:21 ` Frederic Weisbecker
2010-08-31 14:58 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: Frederic Weisbecker @ 2010-08-31 14:21 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Anton Blanchard, mingo, linux-kernel
On Mon, Aug 30, 2010 at 09:31:50PM -0400, Steven Rostedt wrote:
> On Wed, 2010-08-25 at 11:32 +1000, Anton Blanchard wrote:
> > save_stack_trace() stores the instruction pointer, not the function
> > descriptor. On ppc64 the trace stack code currently dereferences the
> > instruction pointer and shows 8 bytes of instructions in our backtraces:
> >
> > # cat /sys/kernel/debug/tracing/stack_trace
> > Depth Size Location (26 entries)
> > ----- ---- --------
> > 0) 5424 112 0x6000000048000004
> > 1) 5312 160 0x60000000ebad01b0
> > 2) 5152 160 0x2c23000041c20030
> > 3) 4992 240 0x600000007c781b79
> > 4) 4752 160 0xe84100284800000c
> > 5) 4592 192 0x600000002fa30000
> > 6) 4400 256 0x7f1800347b7407e0
> > 7) 4144 208 0xe89f0108f87f0070
> > 8) 3936 272 0xe84100282fa30000
> >
> > Since we aren't dealing with function descriptors, use %pS instead of %pF
> > to fix it:
> >
> > # cat /sys/kernel/debug/tracing/stack_trace
> > Depth Size Location (26 entries)
> > ----- ---- --------
> > 0) 5424 112 ftrace_call+0x4/0x8
> > 1) 5312 160 .current_io_context+0x28/0x74
> > 2) 5152 160 .get_io_context+0x48/0xa0
> > 3) 4992 240 .cfq_set_request+0x94/0x4c4
> > 4) 4752 160 .elv_set_request+0x60/0x84
> > 5) 4592 192 .get_request+0x2d4/0x468
> > 6) 4400 256 .get_request_wait+0x7c/0x258
> > 7) 4144 208 .__make_request+0x49c/0x610
> > 8) 3936 272 .generic_make_request+0x390/0x434
> >
> > Signed-off-by: Anton Blanchard <anton@samba.org>
>
> Thanks, I'll test this to make sure it doesn't break x86, and then push
> it into a stable/-rc patch queue.
>
> -- Steve
Ingo has applied it already in perf/urgent.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tracing/trace_stack: Fix stack trace on ppc64
2010-08-31 14:21 ` Frederic Weisbecker
@ 2010-08-31 14:58 ` Steven Rostedt
2010-08-31 15:14 ` Frederic Weisbecker
0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2010-08-31 14:58 UTC (permalink / raw)
To: Frederic Weisbecker; +Cc: Anton Blanchard, mingo, linux-kernel
On Tue, 2010-08-31 at 16:21 +0200, Frederic Weisbecker wrote:
> On Mon, Aug 30, 2010 at 09:31:50PM -0400, Steven Rostedt wrote:
> > On Wed, 2010-08-25 at 11:32 +1000, Anton Blanchard wrote:
> > > save_stack_trace() stores the instruction pointer, not the function
> > > descriptor. On ppc64 the trace stack code currently dereferences the
> > > instruction pointer and shows 8 bytes of instructions in our backtraces:
> > >
> > > # cat /sys/kernel/debug/tracing/stack_trace
> > > Depth Size Location (26 entries)
> > > ----- ---- --------
> > > 0) 5424 112 0x6000000048000004
> > > 1) 5312 160 0x60000000ebad01b0
> > > 2) 5152 160 0x2c23000041c20030
> > > 3) 4992 240 0x600000007c781b79
> > > 4) 4752 160 0xe84100284800000c
> > > 5) 4592 192 0x600000002fa30000
> > > 6) 4400 256 0x7f1800347b7407e0
> > > 7) 4144 208 0xe89f0108f87f0070
> > > 8) 3936 272 0xe84100282fa30000
> > >
> > > Since we aren't dealing with function descriptors, use %pS instead of %pF
> > > to fix it:
> > >
> > > # cat /sys/kernel/debug/tracing/stack_trace
> > > Depth Size Location (26 entries)
> > > ----- ---- --------
> > > 0) 5424 112 ftrace_call+0x4/0x8
> > > 1) 5312 160 .current_io_context+0x28/0x74
> > > 2) 5152 160 .get_io_context+0x48/0xa0
> > > 3) 4992 240 .cfq_set_request+0x94/0x4c4
> > > 4) 4752 160 .elv_set_request+0x60/0x84
> > > 5) 4592 192 .get_request+0x2d4/0x468
> > > 6) 4400 256 .get_request_wait+0x7c/0x258
> > > 7) 4144 208 .__make_request+0x49c/0x610
> > > 8) 3936 272 .generic_make_request+0x390/0x434
> > >
> > > Signed-off-by: Anton Blanchard <anton@samba.org>
> >
> > Thanks, I'll test this to make sure it doesn't break x86, and then push
> > it into a stable/-rc patch queue.
> >
> > -- Steve
>
>
> Ingo has applied it already in perf/urgent.
Hmm, I never saw the tip-bot reply :-(
I guess it only sends to the Cc tags.
-- Steve
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tracing/trace_stack: Fix stack trace on ppc64
2010-08-31 14:58 ` Steven Rostedt
@ 2010-08-31 15:14 ` Frederic Weisbecker
2010-08-31 17:36 ` Ingo Molnar
0 siblings, 1 reply; 7+ messages in thread
From: Frederic Weisbecker @ 2010-08-31 15:14 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Anton Blanchard, mingo, linux-kernel
On Tue, Aug 31, 2010 at 10:58:42AM -0400, Steven Rostedt wrote:
> Hmm, I never saw the tip-bot reply :-(
>
> I guess it only sends to the Cc tags.
>
> -- Steve
>
>
We were in the commit Cc tags but somehow they didn't make it in the email
tags.
Here is the tip-bot email:
---
Commit-ID: 151772dbfad4dbe81721e40f9b3d588ea77bb7aa
Gitweb: http://git.kernel.org/tip/151772dbfad4dbe81721e40f9b3d588ea77bb7aa
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 25 Aug 2010 11:32:38 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 25 Aug 2010 13:08:48 +0200
tracing/trace_stack: Fix stack trace on ppc64
save_stack_trace() stores the instruction pointer, not the
function descriptor. On ppc64 the trace stack code currently
dereferences the instruction pointer and shows 8 bytes of
instructions in our backtraces:
# cat /sys/kernel/debug/tracing/stack_trace
Depth Size Location (26 entries)
----- ---- --------
0) 5424 112 0x6000000048000004
1) 5312 160 0x60000000ebad01b0
2) 5152 160 0x2c23000041c20030
3) 4992 240 0x600000007c781b79
4) 4752 160 0xe84100284800000c
5) 4592 192 0x600000002fa30000
6) 4400 256 0x7f1800347b7407e0
7) 4144 208 0xe89f0108f87f0070
8) 3936 272 0xe84100282fa30000
Since we aren't dealing with function descriptors, use %pS
instead of %pF to fix it:
# cat /sys/kernel/debug/tracing/stack_trace
Depth Size Location (26 entries)
----- ---- --------
0) 5424 112 ftrace_call+0x4/0x8
1) 5312 160 .current_io_context+0x28/0x74
2) 5152 160 .get_io_context+0x48/0xa0
3) 4992 240 .cfq_set_request+0x94/0x4c4
4) 4752 160 .elv_set_request+0x60/0x84
5) 4592 192 .get_request+0x2d4/0x468
6) 4400 256 .get_request_wait+0x7c/0x258
7) 4144 208 .__make_request+0x49c/0x610
8) 3936 272 .generic_make_request+0x390/0x434
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: rostedt@goodmis.org
Cc: fweisbec@gmail.com
LKML-Reference: <20100825013238.GE28360@kryten>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/trace_stack.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index 056468e..a6b7e0e 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -249,7 +249,7 @@ static int trace_lookup_stack(struct seq_file *m, long i)
{
unsigned long addr = stack_dump_trace[i];
- return seq_printf(m, "%pF\n", (void *)addr);
+ return seq_printf(m, "%pS\n", (void *)addr);
}
static void print_disabled(struct seq_file *m)
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] tracing/trace_stack: Fix stack trace on ppc64
2010-08-31 15:14 ` Frederic Weisbecker
@ 2010-08-31 17:36 ` Ingo Molnar
0 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2010-08-31 17:36 UTC (permalink / raw)
To: Frederic Weisbecker; +Cc: Steven Rostedt, Anton Blanchard, mingo, linux-kernel
* Frederic Weisbecker <fweisbec@gmail.com> wrote:
> On Tue, Aug 31, 2010 at 10:58:42AM -0400, Steven Rostedt wrote:
> > Hmm, I never saw the tip-bot reply :-(
> >
> > I guess it only sends to the Cc tags.
> >
> > -- Steve
> >
> >
>
>
> We were in the commit Cc tags but somehow they didn't make it in the email
> tags.
indeed - i forwarded this to hpa.
Ingo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-08-31 17:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25 1:32 [PATCH] tracing/trace_stack: Fix stack trace on ppc64 Anton Blanchard
2010-08-25 12:58 ` [tip:perf/urgent] " tip-bot for Anton Blanchard
2010-08-31 1:31 ` [PATCH] " Steven Rostedt
2010-08-31 14:21 ` Frederic Weisbecker
2010-08-31 14:58 ` Steven Rostedt
2010-08-31 15:14 ` Frederic Weisbecker
2010-08-31 17:36 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox