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

Commit 1b2f6304 authored by Jan Beulich's avatar Jan Beulich Committed by Linus Torvalds
Browse files

[PATCH] x86_64: Reduce screen space needed by stack trace



Especially under Xen, where the console cannot be adjusted to more than 25
lines, it is fairly important that the information displayed during a panic
is as compact as possible. Below adjustments work towards that.

Signed-Off-By: default avatarJan Beulich <jbeulich@novell.com>

Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5329e13d
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -183,7 +183,6 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,

void show_trace(unsigned long *stack)
{
	unsigned long addr;
	const unsigned cpu = safe_smp_processor_id();
	unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr;
	int i;
@@ -193,8 +192,14 @@ void show_trace(unsigned long *stack)

#define HANDLE_STACK(cond) \
	do while (cond) { \
		addr = *stack++; \
		unsigned long addr = *stack++; \
		if (kernel_text_address(addr)) { \
			if (i > 50) { \
				printk("\n       "); \
				i = 0; \
			} \
			else \
				i += printk(" "); \
			/* \
			 * If the address is either in the text segment of the \
			 * kernel, or in the region which contains vmalloc'ed \
@@ -204,16 +209,10 @@ void show_trace(unsigned long *stack)
			 * out the call path that was taken. \
			 */ \
			i += printk_address(addr); \
			if (i > 50) { \
				printk("\n       "); \
				i = 0; \
			} \
			else \
				i += printk(" "); \
		} \
	} while (0)

	for(i = 0; ; ) {
	for(i = 11; ; ) {
		const char *id;
		unsigned long *estack_end;
		estack_end = in_exception_stack(cpu, (unsigned long)stack,