Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186043

Re: [RFC 2/3] arm64: refactor save_stack_trace()

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [RFC 2/3] arm64: refactor save_stack_trace()
Date 2015-07-16 18:20 +0200
Message-ID <pMU38-3pg-1@gated-at.bofh.it> (permalink)
References (10 earlier) <pMFQu-86K-9@gated-at.bofh.it> <pMRoD-7Yz-33@gated-at.bofh.it> <pMSkG-Sa-33@gated-at.bofh.it> <pMSXn-1Ro-9@gated-at.bofh.it> <pMTqs-2pX-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 16 Jul 2015 11:31:15 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> > 
> > In case of the number of entries, the following diff might be needed
> > as I suggested in the previous reply. ;)
> > 
> > ----8<----
> > 
> > @@ -330,7 +333,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 - 1);
> > +			   max_stack_trace.nr_entries);
> 
> This would break x86.

Nope, you were correct. But it was also missing another change:

-- Steve

Index: linux-trace.git/kernel/trace/trace_stack.c
===================================================================
--- linux-trace.git.orig/kernel/trace/trace_stack.c	2015-07-16 11:45:17.816249113 -0400
+++ linux-trace.git/kernel/trace/trace_stack.c	2015-07-16 12:01:51.051403333 -0400
@@ -284,7 +260,7 @@ __next(struct seq_file *m, loff_t *pos)
 {
 	long n = *pos - 1;
 
-	if (n >= max_stack_trace.nr_entries || stack_dump_trace[n] == ULONG_MAX)
+	if (n > max_stack_trace.nr_entries || stack_dump_trace[n] == ULONG_MAX)
 		return NULL;
 
 	m->private = (void *)n;
@@ -354,7 +330,7 @@ static int t_show(struct seq_file *m, vo
 		seq_printf(m, "        Depth    Size   Location"
 			   "    (%d entries)\n"
 			   "        -----    ----   --------\n",
-			   max_stack_trace.nr_entries - 1);
+			   max_stack_trace.nr_entries);
 
 		if (!stack_tracer_enabled && !max_stack_size)
 			print_disabled(m);
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 2/3] arm64: refactor save_stack_trace() AKASHI Takahiro <takahiro.akashi@linaro.org> - 2015-07-13 07:40 +0200
  Re: [RFC 2/3] arm64: refactor save_stack_trace() AKASHI Takahiro <takahiro.akashi@linaro.org> - 2015-07-15 02:30 +0200
    Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-15 05:00 +0200
      Re: [RFC 2/3] arm64: refactor save_stack_trace() AKASHI Takahiro <takahiro.akashi@linaro.org> - 2015-07-15 13:50 +0200
        Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-15 17:00 +0200
          Re: [RFC 2/3] arm64: refactor save_stack_trace() AKASHI Takahiro <takahiro.akashi@linaro.org> - 2015-07-16 02:30 +0200
            Re: [RFC 2/3] arm64: refactor save_stack_trace() AKASHI Takahiro <takahiro.akashi@linaro.org> - 2015-07-16 03:10 +0200
              Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-16 03:40 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Will Deacon <will.deacon@arm.com> - 2015-07-17 12:50 +0200
              Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-16 16:30 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Jungseok Lee <jungseoklee85@gmail.com> - 2015-07-16 17:10 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-16 17:40 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Jungseok Lee <jungseoklee85@gmail.com> - 2015-07-16 18:00 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-16 22:30 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-16 18:20 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Mark Rutland <mark.rutland@arm.com> - 2015-07-17 14:50 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-17 15:00 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-17 15:10 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Jungseok Lee <jungseoklee85@gmail.com> - 2015-07-17 16:30 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-17 16:50 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Jungseok Lee <jungseoklee85@gmail.com> - 2015-07-17 17:00 +0200
              Re: [RFC 2/3] arm64: refactor save_stack_trace() Mark Rutland <mark.rutland@arm.com> - 2015-07-16 16:30 +0200
                Re: [RFC 2/3] arm64: refactor save_stack_trace() Steven Rostedt <rostedt@goodmis.org> - 2015-07-16 16:40 +0200
              Re: [RFC 2/3] arm64: refactor save_stack_trace() Jungseok Lee <jungseoklee85@gmail.com> - 2015-07-17 16:40 +0200

csiph-web