Skip to content

Commit 5ca43f6

Browse files
bebarinotorvalds
authored andcommitted
lib: consolidate DEBUG_STACK_USAGE option
Most arches define CONFIG_DEBUG_STACK_USAGE exactly the same way. Move it to lib/Kconfig.debug so each arch doesn't have to define it. This obviously makes the option generic, but that's fine because the config is already used in generic code. It's not obvious to me that sysrq-P actually does anything caution by keeping the most inclusive wording. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Chris Metcalf <cmetcalf@tilera.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Richard Weinberger <richard@nod.at> Acked-by: Mike Frysinger <vapier@gentoo.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Hirokazu Takata <takata@linux-m32r.org> Acked-by: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mackerras <paulus@samba.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Chen Liqin <liqin.chen@sunplusct.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c84598b commit 5ca43f6

File tree

13 files changed

+9
-105
lines changed

13 files changed

+9
-105
lines changed

arch/arm/Kconfig.debug

-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,6 @@ config DEBUG_USER
6363
8 - SIGSEGV faults
6464
16 - SIGBUS faults
6565

66-
config DEBUG_STACK_USAGE
67-
bool "Enable stack utilization instrumentation"
68-
depends on DEBUG_KERNEL
69-
help
70-
Enables the display of the minimum amount of free stack which each
71-
task has ever had available in the sysrq-T output.
72-
7366
# These options are only for real kernel hackers who want to get their hands dirty.
7467
config DEBUG_LL
7568
bool "Kernel low-level debugging functions"

arch/blackfin/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ config DEBUG_STACKOVERFLOW
99
This option will cause messages to be printed if free stack space
1010
drops below a certain limit.
1111

12-
config DEBUG_STACK_USAGE
13-
bool "Enable stack utilization instrumentation"
14-
depends on DEBUG_KERNEL
15-
help
16-
Enables the display of the minimum amount of free stack which each
17-
task has ever had available in the sysrq-T output.
18-
19-
This option will slow down process creation somewhat.
20-
2112
config DEBUG_VERBOSE
2213
bool "Verbose fault messages"
2314
default y

arch/m32r/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ config DEBUG_STACKOVERFLOW
99
This option will cause messages to be printed if free stack space
1010
drops below a certain limit.
1111

12-
config DEBUG_STACK_USAGE
13-
bool "Stack utilization instrumentation"
14-
depends on DEBUG_KERNEL
15-
help
16-
Enables the display of the minimum amount of free stack which each
17-
task has ever had available in the sysrq-T and sysrq-P debug output.
18-
19-
This option will slow down process creation somewhat.
20-
2112
config DEBUG_PAGEALLOC
2213
bool "Debug page memory allocations"
2314
depends on DEBUG_KERNEL && BROKEN

arch/mips/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ config DEBUG_STACKOVERFLOW
7676
provides another way to check stack overflow happened on kernel mode
7777
stack usually caused by nested interruption.
7878

79-
config DEBUG_STACK_USAGE
80-
bool "Enable stack utilization instrumentation"
81-
depends on DEBUG_KERNEL
82-
help
83-
Enables the display of the minimum amount of free stack which each
84-
task has ever had available in the sysrq-T and sysrq-P debug output.
85-
86-
This option will slow down process creation somewhat.
87-
8879
config SMTC_IDLE_HOOK_DEBUG
8980
bool "Enable additional debug checks before going into CPU idle loop"
9081
depends on DEBUG_KERNEL && MIPS_MT_SMTC

arch/powerpc/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ config DEBUG_STACKOVERFLOW
3535
This option will cause messages to be printed if free stack space
3636
drops below a certain limit.
3737

38-
config DEBUG_STACK_USAGE
39-
bool "Stack utilization instrumentation"
40-
depends on DEBUG_KERNEL
41-
help
42-
Enables the display of the minimum amount of free stack which each
43-
task has ever had available in the sysrq-T and sysrq-P debug output.
44-
45-
This option will slow down process creation somewhat.
46-
4738
config HCALL_STATS
4839
bool "Hypervisor call instrumentation"
4940
depends on PPC_PSERIES && DEBUG_FS && TRACEPOINTS

arch/score/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ config CMDLINE
1616
other cases you can specify kernel args so that you don't have
1717
to set them up in board prom initialization routines.
1818

19-
config DEBUG_STACK_USAGE
20-
bool "Enable stack utilization instrumentation"
21-
depends on DEBUG_KERNEL
22-
help
23-
Enables the display of the minimum amount of free stack which each
24-
task has ever had available in the sysrq-T and sysrq-P debug output.
25-
26-
This option will slow down process creation somewhat.
27-
2819
config RUNTIME_DEBUG
2920
bool "Enable run-time debugging"
3021
depends on DEBUG_KERNEL

arch/sh/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ config STACK_DEBUG
2828
every function call and will therefore incur a major
2929
performance hit. Most users should say N.
3030

31-
config DEBUG_STACK_USAGE
32-
bool "Stack utilization instrumentation"
33-
depends on DEBUG_KERNEL
34-
help
35-
Enables the display of the minimum amount of free stack which each
36-
task has ever had available in the sysrq-T and sysrq-P debug output.
37-
38-
This option will slow down process creation somewhat.
39-
4031
config 4KSTACKS
4132
bool "Use 4Kb for kernel stacks instead of 8Kb"
4233
depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB

arch/sparc/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ config TRACE_IRQFLAGS_SUPPORT
66

77
source "lib/Kconfig.debug"
88

9-
config DEBUG_STACK_USAGE
10-
bool "Enable stack utilization instrumentation"
11-
depends on DEBUG_KERNEL
12-
help
13-
Enables the display of the minimum amount of free stack which each
14-
task has ever had available in the sysrq-T and sysrq-P debug output.
15-
16-
This option will slow down process creation somewhat.
17-
189
config DEBUG_DCFLUSH
1910
bool "D-cache flush debugging"
2011
depends on SPARC64 && DEBUG_KERNEL

arch/tile/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@ config DEBUG_STACKOVERFLOW
2121
This option will cause messages to be printed if free stack space
2222
drops below a certain limit.
2323

24-
config DEBUG_STACK_USAGE
25-
bool "Stack utilization instrumentation"
26-
depends on DEBUG_KERNEL
27-
help
28-
Enables the display of the minimum amount of free stack which each
29-
task has ever had available in the sysrq-T and sysrq-P debug output.
30-
31-
This option will slow down process creation somewhat.
32-
3324
config DEBUG_EXTRA_FLAGS
3425
string "Additional compiler arguments when building with '-g'"
3526
depends on DEBUG_INFO

arch/um/Kconfig.debug

-10
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@ config GCOV
2828
If you're involved in UML kernel development and want to use gcov,
2929
say Y. If you're unsure, say N.
3030

31-
config DEBUG_STACK_USAGE
32-
bool "Stack utilization instrumentation"
33-
default N
34-
help
35-
Track the maximum kernel stack usage - this will look at each
36-
kernel stack at process exit and log it if it's the deepest
37-
stack seen so far.
38-
39-
This option will slow down process creation and destruction somewhat.
40-
4131
config EARLY_PRINTK
4232
bool "Early printk"
4333
default y

arch/unicore32/Kconfig.debug

-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ config EARLY_PRINTK
2727
with klogd/syslogd or the X server. You should normally N here,
2828
unless you want to debug such a crash.
2929

30-
config DEBUG_STACK_USAGE
31-
bool "Enable stack utilization instrumentation"
32-
depends on DEBUG_KERNEL
33-
help
34-
Enables the display of the minimum amount of free stack which each
35-
task has ever had available in the sysrq-T output.
36-
3730
# These options are only for real kernel hackers who want to get their hands dirty.
3831
config DEBUG_LL
3932
bool "Kernel low-level debugging functions"

arch/x86/Kconfig.debug

-9
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ config DEBUG_STACKOVERFLOW
6666
This option will cause messages to be printed if free stack space
6767
drops below a certain limit.
6868

69-
config DEBUG_STACK_USAGE
70-
bool "Stack utilization instrumentation"
71-
depends on DEBUG_KERNEL
72-
---help---
73-
Enables the display of the minimum amount of free stack which each
74-
task has ever had available in the sysrq-T and sysrq-P debug output.
75-
76-
This option will slow down process creation somewhat.
77-
7869
config X86_PTDUMP
7970
bool "Export kernel pagetable layout to userspace via debugfs"
8071
depends on DEBUG_KERNEL

lib/Kconfig.debug

+9
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,15 @@ config STACKTRACE
670670
bool
671671
depends on STACKTRACE_SUPPORT
672672

673+
config DEBUG_STACK_USAGE
674+
bool "Stack utilization instrumentation"
675+
depends on DEBUG_KERNEL
676+
help
677+
Enables the display of the minimum amount of free stack which each
678+
task has ever had available in the sysrq-T and sysrq-P debug output.
679+
680+
This option will slow down process creation somewhat.
681+
673682
config DEBUG_KOBJECT
674683
bool "kobject debugging"
675684
depends on DEBUG_KERNEL

0 commit comments

Comments
 (0)