From e18eecb8b35703a5eea73ee2b45324262029e62c Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Sun, 15 Jul 2007 23:38:48 -0700 Subject: Add generic exit-time stack-depth checking to CONFIG_DEBUG_STACK_USAGE Add generic exit-time stack-depth checking to CONFIG_DEBUG_STACK_USAGE. This also adds UML support. Tested on UML and i386. [akpm@linux-foundation.org: cleanups, speedups, tweaks] Signed-off-by: Jeff Dike Cc: Oleg Nesterov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/Kconfig.debug | 9 +++++++++ arch/um/defconfig | 1 + 2 files changed, 10 insertions(+) (limited to 'arch/um') diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug index 09c1aca6339f..c86f5eb29fd5 100644 --- a/arch/um/Kconfig.debug +++ b/arch/um/Kconfig.debug @@ -47,4 +47,13 @@ config GCOV If you're involved in UML kernel development and want to use gcov, say Y. If you're unsure, say N. +config DEBUG_STACK_USAGE + bool "Stack utilization instrumentation" + default N + help + Track the maximum kernel stack usage - this will look at each + kernel stack at process exit and log it if it's the deepest + stack seen so far. + + This option will slow down process creation and destruction somewhat. endmenu diff --git a/arch/um/defconfig b/arch/um/defconfig index a54d0efecae1..e5b2df9e12de 100644 --- a/arch/um/defconfig +++ b/arch/um/defconfig @@ -527,3 +527,4 @@ CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_GPROF is not set # CONFIG_GCOV is not set +# CONFIG_DEBUG_STACK_USAGE is not set -- cgit v1.2.3