Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755719AbZFCOAJ (ORCPT ); Wed, 3 Jun 2009 10:00:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753054AbZFCN76 (ORCPT ); Wed, 3 Jun 2009 09:59:58 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:34118 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751826AbZFCN75 (ORCPT ); Wed, 3 Jun 2009 09:59:57 -0400 Date: Wed, 3 Jun 2009 09:59:58 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: walimis cc: Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] tracing/trace_stack: fix the number of entries in the header In-Reply-To: <1244016090-7814-1-git-send-email-walimisdev@gmail.com> Message-ID: References: <1244016090-7814-1-git-send-email-walimisdev@gmail.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1617 Lines: 51 On Wed, 3 Jun 2009, walimis wrote: > 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 This is one of those bugs I've been meaning to fix for a long time, but never got around to actually doing it. Thanks! I'll queue this up. -- Steve > --- > 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 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/