Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a37119d authored by Steven Rostedt's avatar Steven Rostedt Committed by Ingo Molnar
Browse files

trace: fix output of stack trace



Impact: fix to output of stack trace

If a function is not found in the stack of the stack tracer, the
number printed is quite strange. This fixes the algorithm to handle
missing functions better.

Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 166d3c79
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ static inline void check_stack(void)
	 * on a new max, so it is far from a fast path.
	 */
	while (i < max_stack_trace.nr_entries) {
		int found = 0;

		stack_dump_index[i] = this_size;
		p = start;
@@ -86,11 +87,13 @@ static inline void check_stack(void)
			if (*p == stack_dump_trace[i]) {
				this_size = stack_dump_index[i++] =
					(top - p) * sizeof(unsigned long);
				found = 1;
				/* Start the search from here */
				start = p + 1;
			}
		}

		if (!found)
			i++;
	}