public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] tracing/trace_stack: fix the number of entries in the header
@ 2009-06-03  8:01 walimis
  2009-06-03  8:01 ` [PATCH 2/3] tracing/events: fix output format of kernel stack walimis
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: walimis @ 2009-06-03  8:01 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar; +Cc: linux-kernel

The last entry in the stack_dump_trace is ULONG_MAX, which is not
a valid entry, but max_stack_trace.nr_entries has accounted for it.
So when printing the header, we should decrease it by one.
Before fix, print as following, for example:

	Depth    Size   Location    (53 entries)	<--- should be 52
	-----    ----   --------
  0)     3264     108   update_wall_time+0x4d5/0x9a0
  ...
 51)       80      80   syscall_call+0x7/0xb
 ^^^
   it's correct.

Signed-off-by: walimis <walimisdev@gmail.com>
---
 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 1796f00..2d7aebd 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -265,7 +265,7 @@ static int t_show(struct seq_file *m, void *v)
 		seq_printf(m, "        Depth    Size   Location"
 			   "    (%d entries)\n"
 			   "        -----    ----   --------\n",
-			   max_stack_trace.nr_entries);
+			   max_stack_trace.nr_entries - 1);
 
 		if (!stack_tracer_enabled && !max_stack_size)
 			print_disabled(m);
-- 
1.6.0.3


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

end of thread, other threads:[~2009-06-07 10:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-03  8:01 [PATCH 1/3] tracing/trace_stack: fix the number of entries in the header walimis
2009-06-03  8:01 ` [PATCH 2/3] tracing/events: fix output format of kernel stack walimis
2009-06-03  8:01   ` [PATCH 3/3] tracing/events: fix output format of user stack walimis
2009-06-03 14:23     ` Steven Rostedt
2009-06-07 10:22     ` [tip:tracing/core] " tip-bot for walimis
2009-06-03 14:23   ` [PATCH 2/3] tracing/events: fix output format of kernel stack Steven Rostedt
2009-06-07 10:21   ` [tip:tracing/core] " tip-bot for walimis
2009-06-03 13:59 ` [PATCH 1/3] tracing/trace_stack: fix the number of entries in the header Steven Rostedt
2009-06-07 10:21 ` [tip:tracing/core] " tip-bot for walimis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox