Skip to contentSkip to conversation

Compress stack unwinder output

PATCH Dave Jones 2 participants 2 messages Oct 6, 2006 – Oct 16, 2006

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

The unwinder has some extra newlines, which eat up loads of screen
space when it spews. (See https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=137900
for a nasty example).

warning_symbol-> and warning-> already printk a newline, so don't add one in the strings passed to them.

arch/x86_64/kernel/traps.c renamed from arch/x86_64/kernel/traps.c~ +5 -5
@@ -289,21 +289,21 @@ void dump_trace(struct task_struct *tsk,
 		}
 		if (unw_ret > 0) {
 			if (call_trace == 1 && !arch_unw_user_mode(&info)) {
-				ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n",
+				ops->warning_symbol(data, "DWARF2 unwinder stuck at %s",
 					     UNW_PC(&info));
 				if ((long)UNW_SP(&info) < 0) {
-					ops->warning(data, "Leftover inexact backtrace:\n");
+					ops->warning(data, "Leftover inexact backtrace:");
 					stack = (unsigned long *)UNW_SP(&info);
 					if (!stack)
 						return;
 				} else
-					ops->warning(data, "Full inexact backtrace again:\n");
+					ops->warning(data, "Full inexact backtrace again:");
 			} else if (call_trace >= 1)
 				return;
 			else
-				ops->warning(data, "Full inexact backtrace again:\n");
+				ops->warning(data, "Full inexact backtrace again:");
 		} else
-			ops->warning(data, "Inexact backtrace:\n");
+			ops->warning(data, "Inexact backtrace:");
 	}
 	if (!stack) {
 		unsigned long dummy;
arch/i386/kernel/traps.c renamed from arch/i386/kernel/traps.c~ +5 -5
@@ -194,22 +194,22 @@ void dump_trace(struct task_struct *task
 		}
 		if (unw_ret > 0) {
 			if (call_trace == 1 && !arch_unw_user_mode(&info)) {
-				ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n",
+				ops->warning_symbol(data, "DWARF2 unwinder stuck at %s",
 					     UNW_PC(&info));
 				if (UNW_SP(&info) >= PAGE_OFFSET) {
-					ops->warning(data, "Leftover inexact backtrace:\n");
+					ops->warning(data, "Leftover inexact backtrace:");
 					stack = (void *)UNW_SP(&info);
 					if (!stack)
 						return;
 					ebp = UNW_FP(&info);
 				} else
-					ops->warning(data, "Full inexact backtrace again:\n");
+					ops->warning(data, "Full inexact backtrace again:");
 			} else if (call_trace >= 1)
 				return;
 			else
-				ops->warning(data, "Full inexact backtrace again:\n");
+				ops->warning(data, "Full inexact backtrace again:");
 		} else
-			ops->warning(data, "Inexact backtrace:\n");
+			ops->warning(data, "Inexact backtrace:");
 	}
 	if (!stack) {
 		unsigned long dummy;
Signature · 1 line
http://www.codemonkey.org.uk
#1 lore raw
Quoted 6 lines · Dave Jones

The unwinder has some extra newlines, which eat up loads of screen
space when it spews. (See https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=137900
for a nasty example).

warning_symbol-> and warning-> already printk a newline, so don't add one in the strings passed to them.

Added in different form (i had already changed that code)

Thanks

-Andi