提交 c4d04be1 编写于 作者: J Johannes Berg 提交者: Paul Mackerras

powerpc: Allow the max stack trace depth to be configured

On my screen, when something crashes, I only have space for maybe 16
functions of the stack trace before the information above it scrolls
off the screen.  It's easy to hack the kernel to print out only that
much, but it's harder to remember to do it.  This introduces a config
option for it so that I can keep the setting in my config.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 0186f47e
......@@ -2,6 +2,15 @@ menu "Kernel hacking"
source "lib/Kconfig.debug"
config PRINT_STACK_DEPTH
int "Stack depth to print" if DEBUG_KERNEL
default 64
help
This option allows you to set the stack depth that the kernel
prints in stack traces. This can be useful if your display is
too small and stack traces cause important information to
scroll off the screen.
config DEBUG_STACKOVERFLOW
bool "Check for stack overflows"
depends on DEBUG_KERNEL
......
......@@ -1000,7 +1000,7 @@ unsigned long get_wchan(struct task_struct *p)
return 0;
}
static int kstack_depth_to_print = 64;
static int kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH;
void show_stack(struct task_struct *tsk, unsigned long *stack)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册