Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'kconfig-diet' from Dave Hansen

Merge Kconfig menu diet patches from Dave Hansen:
"I think the "Kernel Hacking" menu has gotten a bit out of hand. It is
over 120 lines long on my system with everything enabled and options
are scattered around it haphazardly.

http://sr71.net/~dave/linux/kconfig-horror.png

Let's try to introduce some sanity. This set takes that 120 lines
down to 55 and makes it vastly easier to find some things. It's a
start.

This set stands on its own, but there is plenty of room for follow-up
patches. The arch-specific debug options still end up getting stuck
in the top-level "kernel hacking" menu. OPTIMIZE_INLINING, for
instance, could obviously go in to the "compiler options" menu, but
the fact that it is defined in arch/ in a separate Kconfig file keeps
it on its own for the moment.

The Signed-off-by's in here look funky. I changed employers while
working on this set, so I have signoffs from both email addresses"

* emailed patches from Dave Hansen <dave@sr71.net>:
hang and lockup detection menu
kconfig: consolidate printk options
group locking debugging options
consolidate compilation option configs
consolidate runtime testing configs
order memory debugging Kconfig options
consolidate per-arch stack overflow debugging options

+588 -620
+1
arch/arc/Kconfig
··· 34 34 select OF 35 35 select OF_EARLY_FLATTREE 36 36 select PERF_USE_VMALLOC 37 + select HAVE_DEBUG_STACKOVERFLOW 37 38 38 39 config SCHED_OMIT_FRAME_POINTER 39 40 def_bool y
-7
arch/arc/Kconfig.debug
··· 15 15 with klogd/syslogd or the X server. You should normally N here, 16 16 unless you want to debug such a crash. 17 17 18 - config DEBUG_STACKOVERFLOW 19 - bool "Check for stack overflows" 20 - depends on DEBUG_KERNEL 21 - help 22 - This option will cause messages to be printed if free stack space 23 - drops below a certain limit. 24 - 25 18 config 16KSTACKS 26 19 bool "Use 16Kb for kernel stacks instead of 8Kb" 27 20 help
+1
arch/blackfin/Kconfig
··· 41 41 select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS 42 42 select HAVE_MOD_ARCH_SPECIFIC 43 43 select MODULES_USE_ELF_RELA 44 + select HAVE_DEBUG_STACKOVERFLOW 44 45 45 46 config GENERIC_CSUM 46 47 def_bool y
-7
arch/blackfin/Kconfig.debug
··· 2 2 3 3 source "lib/Kconfig.debug" 4 4 5 - config DEBUG_STACKOVERFLOW 6 - bool "Check for stack overflows" 7 - depends on DEBUG_KERNEL 8 - help 9 - This option will cause messages to be printed if free stack space 10 - drops below a certain limit. 11 - 12 5 config DEBUG_VERBOSE 13 6 bool "Verbose fault messages" 14 7 default y
+1
arch/frv/Kconfig
··· 14 14 select ARCH_WANT_IPC_PARSE_VERSION 15 15 select OLD_SIGSUSPEND3 16 16 select OLD_SIGACTION 17 + select HAVE_DEBUG_STACKOVERFLOW 17 18 18 19 config ZONE_DMA 19 20 bool
-4
arch/frv/Kconfig.debug
··· 2 2 3 3 source "lib/Kconfig.debug" 4 4 5 - config DEBUG_STACKOVERFLOW 6 - bool "Check for stack overflows" 7 - depends on DEBUG_KERNEL 8 - 9 5 config GDBSTUB 10 6 bool "Remote GDB kernel debugging" 11 7 depends on DEBUG_KERNEL
+1
arch/m32r/Kconfig
··· 16 16 select GENERIC_ATOMIC64 17 17 select ARCH_USES_GETTIMEOFFSET 18 18 select MODULES_USE_ELF_RELA 19 + select HAVE_DEBUG_STACKOVERFLOW 19 20 20 21 config SBUS 21 22 bool
-7
arch/m32r/Kconfig.debug
··· 2 2 3 3 source "lib/Kconfig.debug" 4 4 5 - config DEBUG_STACKOVERFLOW 6 - bool "Check for stack overflows" 7 - depends on DEBUG_KERNEL 8 - help 9 - This option will cause messages to be printed if free stack space 10 - drops below a certain limit. 11 - 12 5 config DEBUG_PAGEALLOC 13 6 bool "Debug page memory allocations" 14 7 depends on DEBUG_KERNEL && BROKEN
+1
arch/metag/Kconfig
··· 30 30 select OF 31 31 select OF_EARLY_FLATTREE 32 32 select SPARSE_IRQ 33 + select HAVE_DEBUG_STACKOVERFLOW 33 34 34 35 config STACKTRACE_SUPPORT 35 36 def_bool y
-7
arch/metag/Kconfig.debug
··· 6 6 7 7 source "lib/Kconfig.debug" 8 8 9 - config DEBUG_STACKOVERFLOW 10 - bool "Check for stack overflows" 11 - depends on DEBUG_KERNEL 12 - help 13 - This option will cause messages to be printed if free stack space 14 - drops below a certain limit. 15 - 16 9 config 4KSTACKS 17 10 bool "Use 4Kb for kernel stacks instead of 8Kb" 18 11 depends on DEBUG_KERNEL
+1
arch/mips/Kconfig
··· 42 42 select MODULES_USE_ELF_REL if MODULES 43 43 select MODULES_USE_ELF_RELA if MODULES && 64BIT 44 44 select CLONE_BACKWARDS 45 + select HAVE_DEBUG_STACKOVERFLOW 45 46 46 47 menu "Machine selection" 47 48
-9
arch/mips/Kconfig.debug
··· 67 67 68 68 Normally, you will choose 'N' here. 69 69 70 - config DEBUG_STACKOVERFLOW 71 - bool "Check for stack overflows" 72 - depends on DEBUG_KERNEL 73 - help 74 - This option will cause messages to be printed if free stack space 75 - drops below a certain limit(2GB on MIPS). The debugging option 76 - provides another way to check stack overflow happened on kernel mode 77 - stack usually caused by nested interruption. 78 - 79 70 config SMTC_IDLE_HOOK_DEBUG 80 71 bool "Enable additional debug checks before going into CPU idle loop" 81 72 depends on DEBUG_KERNEL && MIPS_MT_SMTC
+1
arch/mn10300/Kconfig
··· 13 13 select MODULES_USE_ELF_RELA 14 14 select OLD_SIGSUSPEND3 15 15 select OLD_SIGACTION 16 + select HAVE_DEBUG_STACKOVERFLOW 16 17 17 18 config AM33_2 18 19 def_bool n
-4
arch/mn10300/Kconfig.debug
··· 2 2 3 3 source "lib/Kconfig.debug" 4 4 5 - config DEBUG_STACKOVERFLOW 6 - bool "Check for stack overflows" 7 - depends on DEBUG_KERNEL 8 - 9 5 config DEBUG_DECOMPRESS_KERNEL 10 6 bool "Using serial port during decompressing kernel" 11 7 depends on DEBUG_KERNEL
+1 -10
arch/openrisc/Kconfig
··· 22 22 select GENERIC_STRNCPY_FROM_USER 23 23 select GENERIC_STRNLEN_USER 24 24 select MODULES_USE_ELF_RELA 25 + select HAVE_DEBUG_STACKOVERFLOW 25 26 26 27 config MMU 27 28 def_bool y ··· 128 127 here. 129 128 130 129 menu "Debugging options" 131 - 132 - config DEBUG_STACKOVERFLOW 133 - bool "Check for kernel stack overflow" 134 - default y 135 - help 136 - Make extra checks for space available on stack in some 137 - critical functions. This will cause kernel to run a bit slower, 138 - but will catch most of kernel stack overruns and exit gracefully. 139 - 140 - Say Y if you are unsure. 141 130 142 131 config JUMP_UPON_UNHANDLED_EXCEPTION 143 132 bool "Try to die gracefully"
+1
arch/parisc/Kconfig
··· 27 27 select MODULES_USE_ELF_RELA 28 28 select CLONE_BACKWARDS 29 29 select TTY # Needed for pdc_cons.c 30 + select HAVE_DEBUG_STACKOVERFLOW 30 31 31 32 help 32 33 The PA-RISC microprocessor is designed by Hewlett-Packard and used
-11
arch/parisc/Kconfig.debug
··· 13 13 If in doubt, say "N". 14 14 15 15 endmenu 16 - 17 - config DEBUG_STACKOVERFLOW 18 - bool "Check for stack overflows" 19 - default y 20 - depends on DEBUG_KERNEL 21 - ---help--- 22 - Say Y here if you want to check the overflows of kernel, IRQ 23 - and exception stacks. This option will cause messages of the 24 - stacks in detail when free stack space drops below a certain 25 - limit. 26 - If in doubt, say "N".
+1
arch/powerpc/Kconfig
··· 138 138 select ARCH_USE_BUILTIN_BSWAP 139 139 select OLD_SIGSUSPEND 140 140 select OLD_SIGACTION if PPC32 141 + select HAVE_DEBUG_STACKOVERFLOW 141 142 142 143 config EARLY_PRINTK 143 144 bool
-7
arch/powerpc/Kconfig.debug
··· 28 28 too small and stack traces cause important information to 29 29 scroll off the screen. 30 30 31 - config DEBUG_STACKOVERFLOW 32 - bool "Check for stack overflows" 33 - depends on DEBUG_KERNEL 34 - help 35 - This option will cause messages to be printed if free stack space 36 - drops below a certain limit. 37 - 38 31 config HCALL_STATS 39 32 bool "Hypervisor call instrumentation" 40 33 depends on PPC_PSERIES && DEBUG_FS && TRACEPOINTS
+1
arch/tile/Kconfig
··· 25 25 select HAVE_ARCH_TRACEHOOK 26 26 select HAVE_SYSCALL_TRACEPOINTS 27 27 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 28 + select HAVE_DEBUG_STACKOVERFLOW 28 29 29 30 # FIXME: investigate whether we need/want these options. 30 31 # select HAVE_IOREMAP_PROT
-7
arch/tile/Kconfig.debug
··· 14 14 with klogd/syslogd. You should normally N here, 15 15 unless you want to debug such a crash. 16 16 17 - config DEBUG_STACKOVERFLOW 18 - bool "Check for stack overflows" 19 - depends on DEBUG_KERNEL 20 - help 21 - This option will cause messages to be printed if free stack space 22 - drops below a certain limit. 23 - 24 17 config DEBUG_EXTRA_FLAGS 25 18 string "Additional compiler arguments when building with '-g'" 26 19 depends on DEBUG_INFO
+1
arch/x86/Kconfig
··· 122 122 select OLD_SIGACTION if X86_32 123 123 select COMPAT_OLD_SIGACTION if IA32_EMULATION 124 124 select RTC_LIB 125 + select HAVE_DEBUG_STACKOVERFLOW 125 126 126 127 config INSTRUCTION_DECODER 127 128 def_bool y
-10
arch/x86/Kconfig.debug
··· 59 59 with klogd/syslogd or the X server. You should normally N here, 60 60 unless you want to debug such a crash. You need usb debug device. 61 61 62 - config DEBUG_STACKOVERFLOW 63 - bool "Check for stack overflows" 64 - depends on DEBUG_KERNEL 65 - ---help--- 66 - Say Y here if you want to check the overflows of kernel, IRQ 67 - and exception stacks. This option will cause messages of the 68 - stacks in detail when free stack space drops below a certain 69 - limit. 70 - If in doubt, say "N". 71 - 72 62 config X86_PTDUMP 73 63 bool "Export kernel pagetable layout to userspace via debugfs" 74 64 depends on DEBUG_KERNEL
+576 -530
lib/Kconfig.debug
··· 1 + menu "printk and dmesg options" 1 2 2 3 config PRINTK_TIME 3 4 bool "Show timing information on printks" ··· 26 25 that are auditing their logs closely may want to set it to a lower 27 26 priority. 28 27 28 + config BOOT_PRINTK_DELAY 29 + bool "Delay each boot printk message by N milliseconds" 30 + depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY 31 + help 32 + This build option allows you to read kernel boot messages 33 + by inserting a short delay after each one. The delay is 34 + specified in milliseconds on the kernel command line, 35 + using "boot_delay=N". 36 + 37 + It is likely that you would also need to use "lpj=M" to preset 38 + the "loops per jiffie" value. 39 + See a previous boot log for the "lpj" value to use for your 40 + system, and then set "lpj=M" before setting "boot_delay=N". 41 + NOTE: Using this option may adversely affect SMP systems. 42 + I.e., processors other than the first one may not boot up. 43 + BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect 44 + what it believes to be lockup conditions. 45 + 46 + config DYNAMIC_DEBUG 47 + bool "Enable dynamic printk() support" 48 + default n 49 + depends on PRINTK 50 + depends on DEBUG_FS 51 + help 52 + 53 + Compiles debug level messages into the kernel, which would not 54 + otherwise be available at runtime. These messages can then be 55 + enabled/disabled based on various levels of scope - per source file, 56 + function, module, format string, and line number. This mechanism 57 + implicitly compiles in all pr_debug() and dev_dbg() calls, which 58 + enlarges the kernel text size by about 2%. 59 + 60 + If a source file is compiled with DEBUG flag set, any 61 + pr_debug() calls in it are enabled by default, but can be 62 + disabled at runtime as below. Note that DEBUG flag is 63 + turned on by many CONFIG_*DEBUG* options. 64 + 65 + Usage: 66 + 67 + Dynamic debugging is controlled via the 'dynamic_debug/control' file, 68 + which is contained in the 'debugfs' filesystem. Thus, the debugfs 69 + filesystem must first be mounted before making use of this feature. 70 + We refer the control file as: <debugfs>/dynamic_debug/control. This 71 + file contains a list of the debug statements that can be enabled. The 72 + format for each line of the file is: 73 + 74 + filename:lineno [module]function flags format 75 + 76 + filename : source file of the debug statement 77 + lineno : line number of the debug statement 78 + module : module that contains the debug statement 79 + function : function that contains the debug statement 80 + flags : '=p' means the line is turned 'on' for printing 81 + format : the format used for the debug statement 82 + 83 + From a live system: 84 + 85 + nullarbor:~ # cat <debugfs>/dynamic_debug/control 86 + # filename:lineno [module]function flags format 87 + fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012" 88 + fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012" 89 + fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012" 90 + 91 + Example usage: 92 + 93 + // enable the message at line 1603 of file svcsock.c 94 + nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > 95 + <debugfs>/dynamic_debug/control 96 + 97 + // enable all the messages in file svcsock.c 98 + nullarbor:~ # echo -n 'file svcsock.c +p' > 99 + <debugfs>/dynamic_debug/control 100 + 101 + // enable all the messages in the NFS server module 102 + nullarbor:~ # echo -n 'module nfsd +p' > 103 + <debugfs>/dynamic_debug/control 104 + 105 + // enable all 12 messages in the function svc_process() 106 + nullarbor:~ # echo -n 'func svc_process +p' > 107 + <debugfs>/dynamic_debug/control 108 + 109 + // disable all 12 messages in the function svc_process() 110 + nullarbor:~ # echo -n 'func svc_process -p' > 111 + <debugfs>/dynamic_debug/control 112 + 113 + See Documentation/dynamic-debug-howto.txt for additional information. 114 + 115 + endmenu # "printk and dmesg options" 116 + 117 + menu "Compile-time checks and compiler options" 118 + 119 + config DEBUG_INFO 120 + bool "Compile the kernel with debug info" 121 + depends on DEBUG_KERNEL 122 + help 123 + If you say Y here the resulting kernel image will include 124 + debugging info resulting in a larger kernel image. 125 + This adds debug symbols to the kernel and modules (gcc -g), and 126 + is needed if you intend to use kernel crashdump or binary object 127 + tools like crash, kgdb, LKCD, gdb, etc on the kernel. 128 + Say Y here only if you plan to debug the kernel. 129 + 130 + If unsure, say N. 131 + 132 + config DEBUG_INFO_REDUCED 133 + bool "Reduce debugging information" 134 + depends on DEBUG_INFO 135 + help 136 + If you say Y here gcc is instructed to generate less debugging 137 + information for structure types. This means that tools that 138 + need full debugging information (like kgdb or systemtap) won't 139 + be happy. But if you merely need debugging information to 140 + resolve line numbers there is no loss. Advantage is that 141 + build directory object sizes shrink dramatically over a full 142 + DEBUG_INFO build and compile times are reduced too. 143 + Only works with newer gcc versions. 144 + 29 145 config ENABLE_WARN_DEPRECATED 30 146 bool "Enable __deprecated logic" 31 147 default y ··· 169 51 Setting this too low will cause a lot of warnings. 170 52 Setting it to 0 disables the warning. 171 53 Requires gcc 4.4 172 - 173 - config MAGIC_SYSRQ 174 - bool "Magic SysRq key" 175 - depends on !UML 176 - help 177 - If you say Y here, you will have some control over the system even 178 - if the system crashes for example during kernel debugging (e.g., you 179 - will be able to flush the buffer cache to disk, reboot the system 180 - immediately or dump some status information). This is accomplished 181 - by pressing various keys while holding SysRq (Alt+PrintScreen). It 182 - also works on a serial console (on PC hardware at least), if you 183 - send a BREAK and then within 5 seconds a command keypress. The 184 - keys are documented in <file:Documentation/sysrq.txt>. Don't say Y 185 - unless you really know what this hack does. 186 54 187 55 config STRIP_ASM_SYMS 188 56 bool "Strip assembler-generated symbols during link" ··· 260 156 - Enable verbose reporting from modpost in order to help resolve 261 157 the section mismatches that are reported. 262 158 159 + # 160 + # Select this config option from the architecture Kconfig, if it 161 + # is preferred to always offer frame pointers as a config 162 + # option on the architecture (regardless of KERNEL_DEBUG): 163 + # 164 + config ARCH_WANT_FRAME_POINTERS 165 + bool 166 + help 167 + 168 + config FRAME_POINTER 169 + bool "Compile the kernel with frame pointers" 170 + depends on DEBUG_KERNEL && \ 171 + (CRIS || M68K || FRV || UML || \ 172 + AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \ 173 + ARCH_WANT_FRAME_POINTERS 174 + default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS 175 + help 176 + If you say Y here the resulting kernel image will be slightly 177 + larger and slower, but it gives very useful debugging information 178 + in case of kernel bugs. (precise oopses/stacktraces/warnings) 179 + 180 + config DEBUG_FORCE_WEAK_PER_CPU 181 + bool "Force weak per-cpu definitions" 182 + depends on DEBUG_KERNEL 183 + help 184 + s390 and alpha require percpu variables in modules to be 185 + defined weak to work around addressing range issue which 186 + puts the following two restrictions on percpu variable 187 + definitions. 188 + 189 + 1. percpu symbols must be unique whether static or not 190 + 2. percpu variables can't be defined inside a function 191 + 192 + To ensure that generic code follows the above rules, this 193 + option forces all percpu variables to be defined as weak. 194 + 195 + endmenu # "Compiler options" 196 + 197 + config MAGIC_SYSRQ 198 + bool "Magic SysRq key" 199 + depends on !UML 200 + help 201 + If you say Y here, you will have some control over the system even 202 + if the system crashes for example during kernel debugging (e.g., you 203 + will be able to flush the buffer cache to disk, reboot the system 204 + immediately or dump some status information). This is accomplished 205 + by pressing various keys while holding SysRq (Alt+PrintScreen). It 206 + also works on a serial console (on PC hardware at least), if you 207 + send a BREAK and then within 5 seconds a command keypress. The 208 + keys are documented in <file:Documentation/sysrq.txt>. Don't say Y 209 + unless you really know what this hack does. 210 + 263 211 config DEBUG_KERNEL 264 212 bool "Kernel debugging" 265 213 help 266 214 Say Y here if you are developing drivers or trying to debug and 267 215 identify kernel problems. 268 216 269 - config DEBUG_SHIRQ 270 - bool "Debug shared IRQ handlers" 271 - depends on DEBUG_KERNEL && GENERIC_HARDIRQS 272 - help 273 - Enable this to generate a spurious interrupt as soon as a shared 274 - interrupt handler is registered, and just before one is deregistered. 275 - Drivers ought to be able to handle interrupts coming in at those 276 - points; some don't and need to be caught. 217 + menu "Memory Debugging" 277 218 278 - config LOCKUP_DETECTOR 279 - bool "Detect Hard and Soft Lockups" 280 - depends on DEBUG_KERNEL && !S390 281 - help 282 - Say Y here to enable the kernel to act as a watchdog to detect 283 - hard and soft lockups. 284 - 285 - Softlockups are bugs that cause the kernel to loop in kernel 286 - mode for more than 20 seconds, without giving other tasks a 287 - chance to run. The current stack trace is displayed upon 288 - detection and the system will stay locked up. 289 - 290 - Hardlockups are bugs that cause the CPU to loop in kernel mode 291 - for more than 10 seconds, without letting other interrupts have a 292 - chance to run. The current stack trace is displayed upon detection 293 - and the system will stay locked up. 294 - 295 - The overhead should be minimal. A periodic hrtimer runs to 296 - generate interrupts and kick the watchdog task every 4 seconds. 297 - An NMI is generated every 10 seconds or so to check for hardlockups. 298 - 299 - The frequency of hrtimer and NMI events and the soft and hard lockup 300 - thresholds can be controlled through the sysctl watchdog_thresh. 301 - 302 - config HARDLOCKUP_DETECTOR 303 - def_bool y 304 - depends on LOCKUP_DETECTOR && !HAVE_NMI_WATCHDOG 305 - depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI 306 - 307 - config BOOTPARAM_HARDLOCKUP_PANIC 308 - bool "Panic (Reboot) On Hard Lockups" 309 - depends on HARDLOCKUP_DETECTOR 310 - help 311 - Say Y here to enable the kernel to panic on "hard lockups", 312 - which are bugs that cause the kernel to loop in kernel 313 - mode with interrupts disabled for more than 10 seconds (configurable 314 - using the watchdog_thresh sysctl). 315 - 316 - Say N if unsure. 317 - 318 - config BOOTPARAM_HARDLOCKUP_PANIC_VALUE 319 - int 320 - depends on HARDLOCKUP_DETECTOR 321 - range 0 1 322 - default 0 if !BOOTPARAM_HARDLOCKUP_PANIC 323 - default 1 if BOOTPARAM_HARDLOCKUP_PANIC 324 - 325 - config BOOTPARAM_SOFTLOCKUP_PANIC 326 - bool "Panic (Reboot) On Soft Lockups" 327 - depends on LOCKUP_DETECTOR 328 - help 329 - Say Y here to enable the kernel to panic on "soft lockups", 330 - which are bugs that cause the kernel to loop in kernel 331 - mode for more than 20 seconds (configurable using the watchdog_thresh 332 - sysctl), without giving other tasks a chance to run. 333 - 334 - The panic can be used in combination with panic_timeout, 335 - to cause the system to reboot automatically after a 336 - lockup has been detected. This feature is useful for 337 - high-availability systems that have uptime guarantees and 338 - where a lockup must be resolved ASAP. 339 - 340 - Say N if unsure. 341 - 342 - config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE 343 - int 344 - depends on LOCKUP_DETECTOR 345 - range 0 1 346 - default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC 347 - default 1 if BOOTPARAM_SOFTLOCKUP_PANIC 348 - 349 - config PANIC_ON_OOPS 350 - bool "Panic on Oops" 351 - help 352 - Say Y here to enable the kernel to panic when it oopses. This 353 - has the same effect as setting oops=panic on the kernel command 354 - line. 355 - 356 - This feature is useful to ensure that the kernel does not do 357 - anything erroneous after an oops which could result in data 358 - corruption or other issues. 359 - 360 - Say N if unsure. 361 - 362 - config PANIC_ON_OOPS_VALUE 363 - int 364 - range 0 1 365 - default 0 if !PANIC_ON_OOPS 366 - default 1 if PANIC_ON_OOPS 367 - 368 - config DETECT_HUNG_TASK 369 - bool "Detect Hung Tasks" 370 - depends on DEBUG_KERNEL 371 - default LOCKUP_DETECTOR 372 - help 373 - Say Y here to enable the kernel to detect "hung tasks", 374 - which are bugs that cause the task to be stuck in 375 - uninterruptible "D" state indefinitiley. 376 - 377 - When a hung task is detected, the kernel will print the 378 - current stack trace (which you should report), but the 379 - task will stay in uninterruptible state. If lockdep is 380 - enabled then all held locks will also be reported. This 381 - feature has negligible overhead. 382 - 383 - config DEFAULT_HUNG_TASK_TIMEOUT 384 - int "Default timeout for hung task detection (in seconds)" 385 - depends on DETECT_HUNG_TASK 386 - default 120 387 - help 388 - This option controls the default timeout (in seconds) used 389 - to determine when a task has become non-responsive and should 390 - be considered hung. 391 - 392 - It can be adjusted at runtime via the kernel.hung_task_timeout_secs 393 - sysctl or by writing a value to 394 - /proc/sys/kernel/hung_task_timeout_secs. 395 - 396 - A timeout of 0 disables the check. The default is two minutes. 397 - Keeping the default should be fine in most cases. 398 - 399 - config BOOTPARAM_HUNG_TASK_PANIC 400 - bool "Panic (Reboot) On Hung Tasks" 401 - depends on DETECT_HUNG_TASK 402 - help 403 - Say Y here to enable the kernel to panic on "hung tasks", 404 - which are bugs that cause the kernel to leave a task stuck 405 - in uninterruptible "D" state. 406 - 407 - The panic can be used in combination with panic_timeout, 408 - to cause the system to reboot automatically after a 409 - hung task has been detected. This feature is useful for 410 - high-availability systems that have uptime guarantees and 411 - where a hung tasks must be resolved ASAP. 412 - 413 - Say N if unsure. 414 - 415 - config BOOTPARAM_HUNG_TASK_PANIC_VALUE 416 - int 417 - depends on DETECT_HUNG_TASK 418 - range 0 1 419 - default 0 if !BOOTPARAM_HUNG_TASK_PANIC 420 - default 1 if BOOTPARAM_HUNG_TASK_PANIC 421 - 422 - config SCHED_DEBUG 423 - bool "Collect scheduler debugging info" 424 - depends on DEBUG_KERNEL && PROC_FS 425 - default y 426 - help 427 - If you say Y here, the /proc/sched_debug file will be provided 428 - that can help debug the scheduler. The runtime overhead of this 429 - option is minimal. 430 - 431 - config SCHEDSTATS 432 - bool "Collect scheduler statistics" 433 - depends on DEBUG_KERNEL && PROC_FS 434 - help 435 - If you say Y here, additional code will be inserted into the 436 - scheduler and related routines to collect statistics about 437 - scheduler behavior and provide them in /proc/schedstat. These 438 - stats may be useful for both tuning and debugging the scheduler 439 - If you aren't debugging the scheduler or trying to tune a specific 440 - application, you can say N to avoid the very slight overhead 441 - this adds. 442 - 443 - config TIMER_STATS 444 - bool "Collect kernel timers statistics" 445 - depends on DEBUG_KERNEL && PROC_FS 446 - help 447 - If you say Y here, additional code will be inserted into the 448 - timer routines to collect statistics about kernel timers being 449 - reprogrammed. The statistics can be read from /proc/timer_stats. 450 - The statistics collection is started by writing 1 to /proc/timer_stats, 451 - writing 0 stops it. This feature is useful to collect information 452 - about timer usage patterns in kernel and userspace. This feature 453 - is lightweight if enabled in the kernel config but not activated 454 - (it defaults to deactivated on bootup and will only be activated 455 - if some application like powertop activates it explicitly). 219 + source mm/Kconfig.debug 456 220 457 221 config DEBUG_OBJECTS 458 222 bool "Debug object operations" ··· 474 502 Say Y here to disable kmemleak by default. It can then be enabled 475 503 on the command line via kmemleak=on. 476 504 505 + config DEBUG_STACK_USAGE 506 + bool "Stack utilization instrumentation" 507 + depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG 508 + help 509 + Enables the display of the minimum amount of free stack which each 510 + task has ever had available in the sysrq-T and sysrq-P debug output. 511 + 512 + This option will slow down process creation somewhat. 513 + 514 + config DEBUG_VM 515 + bool "Debug VM" 516 + depends on DEBUG_KERNEL 517 + help 518 + Enable this to turn on extended checks in the virtual-memory system 519 + that may impact performance. 520 + 521 + If unsure, say N. 522 + 523 + config DEBUG_VM_RB 524 + bool "Debug VM red-black trees" 525 + depends on DEBUG_VM 526 + help 527 + Enable this to turn on more extended checks in the virtual-memory 528 + system that may impact performance. 529 + 530 + If unsure, say N. 531 + 532 + config DEBUG_VIRTUAL 533 + bool "Debug VM translations" 534 + depends on DEBUG_KERNEL && X86 535 + help 536 + Enable some costly sanity checks in virtual to page code. This can 537 + catch mistakes with virt_to_page() and friends. 538 + 539 + If unsure, say N. 540 + 541 + config DEBUG_NOMMU_REGIONS 542 + bool "Debug the global anon/private NOMMU mapping region tree" 543 + depends on DEBUG_KERNEL && !MMU 544 + help 545 + This option causes the global tree of anonymous and private mapping 546 + regions to be regularly checked for invalid topology. 547 + 548 + config DEBUG_MEMORY_INIT 549 + bool "Debug memory initialisation" if EXPERT 550 + default !EXPERT 551 + help 552 + Enable this for additional checks during memory initialisation. 553 + The sanity checks verify aspects of the VM such as the memory model 554 + and other information provided by the architecture. Verbose 555 + information will be printed at KERN_DEBUG loglevel depending 556 + on the mminit_loglevel= command-line option. 557 + 558 + If unsure, say Y 559 + 560 + config MEMORY_NOTIFIER_ERROR_INJECT 561 + tristate "Memory hotplug notifier error injection module" 562 + depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION 563 + help 564 + This option provides the ability to inject artificial errors to 565 + memory hotplug notifier chain callbacks. It is controlled through 566 + debugfs interface under /sys/kernel/debug/notifier-error-inject/memory 567 + 568 + If the notifier call chain should be failed with some events 569 + notified, write the error code to "actions/<notifier event>/error". 570 + 571 + Example: Inject memory hotplug offline error (-12 == -ENOMEM) 572 + 573 + # cd /sys/kernel/debug/notifier-error-inject/memory 574 + # echo -12 > actions/MEM_GOING_OFFLINE/error 575 + # echo offline > /sys/devices/system/memory/memoryXXX/state 576 + bash: echo: write error: Cannot allocate memory 577 + 578 + To compile this code as a module, choose M here: the module will 579 + be called memory-notifier-error-inject. 580 + 581 + If unsure, say N. 582 + 583 + config DEBUG_PER_CPU_MAPS 584 + bool "Debug access to per_cpu maps" 585 + depends on DEBUG_KERNEL 586 + depends on SMP 587 + help 588 + Say Y to verify that the per_cpu map being accessed has 589 + been set up. This adds a fair amount of code to kernel memory 590 + and decreases performance. 591 + 592 + Say N if unsure. 593 + 594 + config DEBUG_HIGHMEM 595 + bool "Highmem debugging" 596 + depends on DEBUG_KERNEL && HIGHMEM 597 + help 598 + This options enables addition error checking for high memory systems. 599 + Disable for production systems. 600 + 601 + config HAVE_DEBUG_STACKOVERFLOW 602 + bool 603 + 604 + config DEBUG_STACKOVERFLOW 605 + bool "Check for stack overflows" 606 + depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW 607 + ---help--- 608 + Say Y here if you want to check for overflows of kernel, IRQ 609 + and exception stacks (if your archicture uses them). This 610 + option will show detailed messages if free stack space drops 611 + below a certain limit. 612 + 613 + These kinds of bugs usually occur when call-chains in the 614 + kernel get too deep, especially when interrupts are 615 + involved. 616 + 617 + Use this in cases where you see apparently random memory 618 + corruption, especially if it appears in 'struct thread_info' 619 + 620 + If in doubt, say "N". 621 + 622 + source "lib/Kconfig.kmemcheck" 623 + 624 + endmenu # "Memory Debugging" 625 + 626 + config DEBUG_SHIRQ 627 + bool "Debug shared IRQ handlers" 628 + depends on DEBUG_KERNEL && GENERIC_HARDIRQS 629 + help 630 + Enable this to generate a spurious interrupt as soon as a shared 631 + interrupt handler is registered, and just before one is deregistered. 632 + Drivers ought to be able to handle interrupts coming in at those 633 + points; some don't and need to be caught. 634 + 635 + menu "Debug Lockups and Hangs" 636 + 637 + config LOCKUP_DETECTOR 638 + bool "Detect Hard and Soft Lockups" 639 + depends on DEBUG_KERNEL && !S390 640 + help 641 + Say Y here to enable the kernel to act as a watchdog to detect 642 + hard and soft lockups. 643 + 644 + Softlockups are bugs that cause the kernel to loop in kernel 645 + mode for more than 20 seconds, without giving other tasks a 646 + chance to run. The current stack trace is displayed upon 647 + detection and the system will stay locked up. 648 + 649 + Hardlockups are bugs that cause the CPU to loop in kernel mode 650 + for more than 10 seconds, without letting other interrupts have a 651 + chance to run. The current stack trace is displayed upon detection 652 + and the system will stay locked up. 653 + 654 + The overhead should be minimal. A periodic hrtimer runs to 655 + generate interrupts and kick the watchdog task every 4 seconds. 656 + An NMI is generated every 10 seconds or so to check for hardlockups. 657 + 658 + The frequency of hrtimer and NMI events and the soft and hard lockup 659 + thresholds can be controlled through the sysctl watchdog_thresh. 660 + 661 + config HARDLOCKUP_DETECTOR 662 + def_bool y 663 + depends on LOCKUP_DETECTOR && !HAVE_NMI_WATCHDOG 664 + depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI 665 + 666 + config BOOTPARAM_HARDLOCKUP_PANIC 667 + bool "Panic (Reboot) On Hard Lockups" 668 + depends on HARDLOCKUP_DETECTOR 669 + help 670 + Say Y here to enable the kernel to panic on "hard lockups", 671 + which are bugs that cause the kernel to loop in kernel 672 + mode with interrupts disabled for more than 10 seconds (configurable 673 + using the watchdog_thresh sysctl). 674 + 675 + Say N if unsure. 676 + 677 + config BOOTPARAM_HARDLOCKUP_PANIC_VALUE 678 + int 679 + depends on HARDLOCKUP_DETECTOR 680 + range 0 1 681 + default 0 if !BOOTPARAM_HARDLOCKUP_PANIC 682 + default 1 if BOOTPARAM_HARDLOCKUP_PANIC 683 + 684 + config BOOTPARAM_SOFTLOCKUP_PANIC 685 + bool "Panic (Reboot) On Soft Lockups" 686 + depends on LOCKUP_DETECTOR 687 + help 688 + Say Y here to enable the kernel to panic on "soft lockups", 689 + which are bugs that cause the kernel to loop in kernel 690 + mode for more than 20 seconds (configurable using the watchdog_thresh 691 + sysctl), without giving other tasks a chance to run. 692 + 693 + The panic can be used in combination with panic_timeout, 694 + to cause the system to reboot automatically after a 695 + lockup has been detected. This feature is useful for 696 + high-availability systems that have uptime guarantees and 697 + where a lockup must be resolved ASAP. 698 + 699 + Say N if unsure. 700 + 701 + config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE 702 + int 703 + depends on LOCKUP_DETECTOR 704 + range 0 1 705 + default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC 706 + default 1 if BOOTPARAM_SOFTLOCKUP_PANIC 707 + 708 + config DETECT_HUNG_TASK 709 + bool "Detect Hung Tasks" 710 + depends on DEBUG_KERNEL 711 + default LOCKUP_DETECTOR 712 + help 713 + Say Y here to enable the kernel to detect "hung tasks", 714 + which are bugs that cause the task to be stuck in 715 + uninterruptible "D" state indefinitiley. 716 + 717 + When a hung task is detected, the kernel will print the 718 + current stack trace (which you should report), but the 719 + task will stay in uninterruptible state. If lockdep is 720 + enabled then all held locks will also be reported. This 721 + feature has negligible overhead. 722 + 723 + config DEFAULT_HUNG_TASK_TIMEOUT 724 + int "Default timeout for hung task detection (in seconds)" 725 + depends on DETECT_HUNG_TASK 726 + default 120 727 + help 728 + This option controls the default timeout (in seconds) used 729 + to determine when a task has become non-responsive and should 730 + be considered hung. 731 + 732 + It can be adjusted at runtime via the kernel.hung_task_timeout_secs 733 + sysctl or by writing a value to 734 + /proc/sys/kernel/hung_task_timeout_secs. 735 + 736 + A timeout of 0 disables the check. The default is two minutes. 737 + Keeping the default should be fine in most cases. 738 + 739 + config BOOTPARAM_HUNG_TASK_PANIC 740 + bool "Panic (Reboot) On Hung Tasks" 741 + depends on DETECT_HUNG_TASK 742 + help 743 + Say Y here to enable the kernel to panic on "hung tasks", 744 + which are bugs that cause the kernel to leave a task stuck 745 + in uninterruptible "D" state. 746 + 747 + The panic can be used in combination with panic_timeout, 748 + to cause the system to reboot automatically after a 749 + hung task has been detected. This feature is useful for 750 + high-availability systems that have uptime guarantees and 751 + where a hung tasks must be resolved ASAP. 752 + 753 + Say N if unsure. 754 + 755 + config BOOTPARAM_HUNG_TASK_PANIC_VALUE 756 + int 757 + depends on DETECT_HUNG_TASK 758 + range 0 1 759 + default 0 if !BOOTPARAM_HUNG_TASK_PANIC 760 + default 1 if BOOTPARAM_HUNG_TASK_PANIC 761 + 762 + endmenu # "Debug lockups and hangs" 763 + 764 + config PANIC_ON_OOPS 765 + bool "Panic on Oops" 766 + help 767 + Say Y here to enable the kernel to panic when it oopses. This 768 + has the same effect as setting oops=panic on the kernel command 769 + line. 770 + 771 + This feature is useful to ensure that the kernel does not do 772 + anything erroneous after an oops which could result in data 773 + corruption or other issues. 774 + 775 + Say N if unsure. 776 + 777 + config PANIC_ON_OOPS_VALUE 778 + int 779 + range 0 1 780 + default 0 if !PANIC_ON_OOPS 781 + default 1 if PANIC_ON_OOPS 782 + 783 + config SCHED_DEBUG 784 + bool "Collect scheduler debugging info" 785 + depends on DEBUG_KERNEL && PROC_FS 786 + default y 787 + help 788 + If you say Y here, the /proc/sched_debug file will be provided 789 + that can help debug the scheduler. The runtime overhead of this 790 + option is minimal. 791 + 792 + config SCHEDSTATS 793 + bool "Collect scheduler statistics" 794 + depends on DEBUG_KERNEL && PROC_FS 795 + help 796 + If you say Y here, additional code will be inserted into the 797 + scheduler and related routines to collect statistics about 798 + scheduler behavior and provide them in /proc/schedstat. These 799 + stats may be useful for both tuning and debugging the scheduler 800 + If you aren't debugging the scheduler or trying to tune a specific 801 + application, you can say N to avoid the very slight overhead 802 + this adds. 803 + 804 + config TIMER_STATS 805 + bool "Collect kernel timers statistics" 806 + depends on DEBUG_KERNEL && PROC_FS 807 + help 808 + If you say Y here, additional code will be inserted into the 809 + timer routines to collect statistics about kernel timers being 810 + reprogrammed. The statistics can be read from /proc/timer_stats. 811 + The statistics collection is started by writing 1 to /proc/timer_stats, 812 + writing 0 stops it. This feature is useful to collect information 813 + about timer usage patterns in kernel and userspace. This feature 814 + is lightweight if enabled in the kernel config but not activated 815 + (it defaults to deactivated on bootup and will only be activated 816 + if some application like powertop activates it explicitly). 817 + 477 818 config DEBUG_PREEMPT 478 819 bool "Debug preemptible kernel" 479 820 depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT ··· 796 511 commonly used smp_processor_id() function and will print warnings 797 512 if kernel code uses it in a preemption-unsafe way. Also, the kernel 798 513 will detect preemption count underflows. 514 + 515 + menu "Lock Debugging (spinlocks, mutexes, etc...)" 799 516 800 517 config DEBUG_RT_MUTEXES 801 518 bool "RT Mutex debugging, deadlock detection" ··· 941 654 additional runtime checks to debug itself, at the price 942 655 of more runtime overhead. 943 656 944 - config TRACE_IRQFLAGS 945 - bool 946 - help 947 - Enables hooks to interrupt enabling and disabling for 948 - either tracing or lock debugging. 949 - 950 657 config DEBUG_ATOMIC_SLEEP 951 658 bool "Sleep inside atomic section checking" 952 659 select PREEMPT_COUNT ··· 962 681 The following locking APIs are covered: spinlocks, rwlocks, 963 682 mutexes and rwsems. 964 683 684 + endmenu # lock debugging 685 + 686 + config TRACE_IRQFLAGS 687 + bool 688 + help 689 + Enables hooks to interrupt enabling and disabling for 690 + either tracing or lock debugging. 691 + 965 692 config STACKTRACE 966 693 bool 967 694 depends on STACKTRACE_SUPPORT 968 - 969 - config DEBUG_STACK_USAGE 970 - bool "Stack utilization instrumentation" 971 - depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG 972 - help 973 - Enables the display of the minimum amount of free stack which each 974 - task has ever had available in the sysrq-T and sysrq-P debug output. 975 - 976 - This option will slow down process creation somewhat. 977 695 978 696 config DEBUG_KOBJECT 979 697 bool "kobject debugging" ··· 980 700 help 981 701 If you say Y here, some extra kobject debugging messages will be sent 982 702 to the syslog. 983 - 984 - config DEBUG_HIGHMEM 985 - bool "Highmem debugging" 986 - depends on DEBUG_KERNEL && HIGHMEM 987 - help 988 - This options enables addition error checking for high memory systems. 989 - Disable for production systems. 990 703 991 704 config HAVE_DEBUG_BUGVERBOSE 992 705 bool ··· 993 720 of the BUG call as well as the EIP and oops trace. This aids 994 721 debugging but costs about 70-100K of memory. 995 722 996 - config DEBUG_INFO 997 - bool "Compile the kernel with debug info" 998 - depends on DEBUG_KERNEL 999 - help 1000 - If you say Y here the resulting kernel image will include 1001 - debugging info resulting in a larger kernel image. 1002 - This adds debug symbols to the kernel and modules (gcc -g), and 1003 - is needed if you intend to use kernel crashdump or binary object 1004 - tools like crash, kgdb, LKCD, gdb, etc on the kernel. 1005 - Say Y here only if you plan to debug the kernel. 1006 - 1007 - If unsure, say N. 1008 - 1009 - config DEBUG_INFO_REDUCED 1010 - bool "Reduce debugging information" 1011 - depends on DEBUG_INFO 1012 - help 1013 - If you say Y here gcc is instructed to generate less debugging 1014 - information for structure types. This means that tools that 1015 - need full debugging information (like kgdb or systemtap) won't 1016 - be happy. But if you merely need debugging information to 1017 - resolve line numbers there is no loss. Advantage is that 1018 - build directory object sizes shrink dramatically over a full 1019 - DEBUG_INFO build and compile times are reduced too. 1020 - Only works with newer gcc versions. 1021 - 1022 - config DEBUG_VM 1023 - bool "Debug VM" 1024 - depends on DEBUG_KERNEL 1025 - help 1026 - Enable this to turn on extended checks in the virtual-memory system 1027 - that may impact performance. 1028 - 1029 - If unsure, say N. 1030 - 1031 - config DEBUG_VM_RB 1032 - bool "Debug VM red-black trees" 1033 - depends on DEBUG_VM 1034 - help 1035 - Enable this to turn on more extended checks in the virtual-memory 1036 - system that may impact performance. 1037 - 1038 - If unsure, say N. 1039 - 1040 - config DEBUG_VIRTUAL 1041 - bool "Debug VM translations" 1042 - depends on DEBUG_KERNEL && X86 1043 - help 1044 - Enable some costly sanity checks in virtual to page code. This can 1045 - catch mistakes with virt_to_page() and friends. 1046 - 1047 - If unsure, say N. 1048 - 1049 - config DEBUG_NOMMU_REGIONS 1050 - bool "Debug the global anon/private NOMMU mapping region tree" 1051 - depends on DEBUG_KERNEL && !MMU 1052 - help 1053 - This option causes the global tree of anonymous and private mapping 1054 - regions to be regularly checked for invalid topology. 1055 - 1056 723 config DEBUG_WRITECOUNT 1057 724 bool "Debug filesystem writers count" 1058 725 depends on DEBUG_KERNEL ··· 1003 790 1004 791 If unsure, say N. 1005 792 1006 - config DEBUG_MEMORY_INIT 1007 - bool "Debug memory initialisation" if EXPERT 1008 - default !EXPERT 1009 - help 1010 - Enable this for additional checks during memory initialisation. 1011 - The sanity checks verify aspects of the VM such as the memory model 1012 - and other information provided by the architecture. Verbose 1013 - information will be printed at KERN_DEBUG loglevel depending 1014 - on the mminit_loglevel= command-line option. 1015 - 1016 - If unsure, say Y 1017 - 1018 793 config DEBUG_LIST 1019 794 bool "Debug linked list manipulation" 1020 795 depends on DEBUG_KERNEL 1021 796 help 1022 797 Enable this to turn on extended checks in the linked-list 1023 798 walking routines. 1024 - 1025 - If unsure, say N. 1026 - 1027 - config TEST_LIST_SORT 1028 - bool "Linked list sorting test" 1029 - depends on DEBUG_KERNEL 1030 - help 1031 - Enable this to turn on 'list_sort()' function test. This test is 1032 - executed only once during system boot, so affects only boot time. 1033 799 1034 800 If unsure, say N. 1035 801 ··· 1046 854 security pointer in the cred struct is never seen to be invalid. 1047 855 1048 856 If unsure, say N. 1049 - 1050 - # 1051 - # Select this config option from the architecture Kconfig, if it 1052 - # is preferred to always offer frame pointers as a config 1053 - # option on the architecture (regardless of KERNEL_DEBUG): 1054 - # 1055 - config ARCH_WANT_FRAME_POINTERS 1056 - bool 1057 - help 1058 - 1059 - config FRAME_POINTER 1060 - bool "Compile the kernel with frame pointers" 1061 - depends on DEBUG_KERNEL && \ 1062 - (CRIS || M68K || FRV || UML || \ 1063 - AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \ 1064 - ARCH_WANT_FRAME_POINTERS 1065 - default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS 1066 - help 1067 - If you say Y here the resulting kernel image will be slightly 1068 - larger and slower, but it gives very useful debugging information 1069 - in case of kernel bugs. (precise oopses/stacktraces/warnings) 1070 - 1071 - config BOOT_PRINTK_DELAY 1072 - bool "Delay each boot printk message by N milliseconds" 1073 - depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY 1074 - help 1075 - This build option allows you to read kernel boot messages 1076 - by inserting a short delay after each one. The delay is 1077 - specified in milliseconds on the kernel command line, 1078 - using "boot_delay=N". 1079 - 1080 - It is likely that you would also need to use "lpj=M" to preset 1081 - the "loops per jiffie" value. 1082 - See a previous boot log for the "lpj" value to use for your 1083 - system, and then set "lpj=M" before setting "boot_delay=N". 1084 - NOTE: Using this option may adversely affect SMP systems. 1085 - I.e., processors other than the first one may not boot up. 1086 - BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect 1087 - what it believes to be lockup conditions. 1088 857 1089 858 menu "RCU Debugging" 1090 859 ··· 1185 1032 1186 1033 endmenu # "RCU Debugging" 1187 1034 1188 - config KPROBES_SANITY_TEST 1189 - bool "Kprobes sanity tests" 1190 - depends on DEBUG_KERNEL 1191 - depends on KPROBES 1192 - default n 1193 - help 1194 - This option provides for testing basic kprobes functionality on 1195 - boot. A sample kprobe, jprobe and kretprobe are inserted and 1196 - verified for functionality. 1197 - 1198 - Say N if you are unsure. 1199 - 1200 - config BACKTRACE_SELF_TEST 1201 - tristate "Self test for the backtrace code" 1202 - depends on DEBUG_KERNEL 1203 - default n 1204 - help 1205 - This option provides a kernel module that can be used to test 1206 - the kernel stack backtrace code. This option is not useful 1207 - for distributions or general kernels, but only for kernel 1208 - developers working on architecture code. 1209 - 1210 - Note that if you want to also test saved backtraces, you will 1211 - have to enable STACKTRACE as well. 1212 - 1213 - Say N if you are unsure. 1214 - 1215 1035 config DEBUG_BLOCK_EXT_DEVT 1216 1036 bool "Force extended block device numbers and spread them" 1217 1037 depends on DEBUG_KERNEL ··· 1211 1085 Textual device names (root=/dev/sdXn) will continue to work. 1212 1086 1213 1087 Say N if you are unsure. 1214 - 1215 - config DEBUG_FORCE_WEAK_PER_CPU 1216 - bool "Force weak per-cpu definitions" 1217 - depends on DEBUG_KERNEL 1218 - help 1219 - s390 and alpha require percpu variables in modules to be 1220 - defined weak to work around addressing range issue which 1221 - puts the following two restrictions on percpu variable 1222 - definitions. 1223 - 1224 - 1. percpu symbols must be unique whether static or not 1225 - 2. percpu variables can't be defined inside a function 1226 - 1227 - To ensure that generic code follows the above rules, this 1228 - option forces all percpu variables to be defined as weak. 1229 - 1230 - config DEBUG_PER_CPU_MAPS 1231 - bool "Debug access to per_cpu maps" 1232 - depends on DEBUG_KERNEL 1233 - depends on SMP 1234 - help 1235 - Say Y to verify that the per_cpu map being accessed has 1236 - been set up. This adds a fair amount of code to kernel memory 1237 - and decreases performance. 1238 - 1239 - Say N if unsure. 1240 - 1241 - config LKDTM 1242 - tristate "Linux Kernel Dump Test Tool Module" 1243 - depends on DEBUG_FS 1244 - depends on BLOCK 1245 - default n 1246 - help 1247 - This module enables testing of the different dumping mechanisms by 1248 - inducing system failures at predefined crash points. 1249 - If you don't need it: say N 1250 - Choose M here to compile this code as a module. The module will be 1251 - called lkdtm. 1252 - 1253 - Documentation on how to use the module can be found in 1254 - Documentation/fault-injection/provoke-crashes.txt 1255 1088 1256 1089 config NOTIFIER_ERROR_INJECTION 1257 1090 tristate "Notifier error injection" ··· 1268 1183 1269 1184 To compile this code as a module, choose M here: the module will 1270 1185 be called pm-notifier-error-inject. 1271 - 1272 - If unsure, say N. 1273 - 1274 - config MEMORY_NOTIFIER_ERROR_INJECT 1275 - tristate "Memory hotplug notifier error injection module" 1276 - depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION 1277 - help 1278 - This option provides the ability to inject artificial errors to 1279 - memory hotplug notifier chain callbacks. It is controlled through 1280 - debugfs interface under /sys/kernel/debug/notifier-error-inject/memory 1281 - 1282 - If the notifier call chain should be failed with some events 1283 - notified, write the error code to "actions/<notifier event>/error". 1284 - 1285 - Example: Inject memory hotplug offline error (-12 == -ENOMEM) 1286 - 1287 - # cd /sys/kernel/debug/notifier-error-inject/memory 1288 - # echo -12 > actions/MEM_GOING_OFFLINE/error 1289 - # echo offline > /sys/devices/system/memory/memoryXXX/state 1290 - bash: echo: write error: Cannot allocate memory 1291 - 1292 - To compile this code as a module, choose M here: the module will 1293 - be called memory-notifier-error-inject. 1294 1186 1295 1187 If unsure, say N. 1296 1188 ··· 1385 1323 1386 1324 If unsure, say N. 1387 1325 1388 - source mm/Kconfig.debug 1389 1326 source kernel/trace/Kconfig 1327 + 1328 + menu "Runtime Testing" 1329 + 1330 + config LKDTM 1331 + tristate "Linux Kernel Dump Test Tool Module" 1332 + depends on DEBUG_FS 1333 + depends on BLOCK 1334 + default n 1335 + help 1336 + This module enables testing of the different dumping mechanisms by 1337 + inducing system failures at predefined crash points. 1338 + If you don't need it: say N 1339 + Choose M here to compile this code as a module. The module will be 1340 + called lkdtm. 1341 + 1342 + Documentation on how to use the module can be found in 1343 + Documentation/fault-injection/provoke-crashes.txt 1344 + 1345 + config TEST_LIST_SORT 1346 + bool "Linked list sorting test" 1347 + depends on DEBUG_KERNEL 1348 + help 1349 + Enable this to turn on 'list_sort()' function test. This test is 1350 + executed only once during system boot, so affects only boot time. 1351 + 1352 + If unsure, say N. 1353 + 1354 + config KPROBES_SANITY_TEST 1355 + bool "Kprobes sanity tests" 1356 + depends on DEBUG_KERNEL 1357 + depends on KPROBES 1358 + default n 1359 + help 1360 + This option provides for testing basic kprobes functionality on 1361 + boot. A sample kprobe, jprobe and kretprobe are inserted and 1362 + verified for functionality. 1363 + 1364 + Say N if you are unsure. 1365 + 1366 + config BACKTRACE_SELF_TEST 1367 + tristate "Self test for the backtrace code" 1368 + depends on DEBUG_KERNEL 1369 + default n 1370 + help 1371 + This option provides a kernel module that can be used to test 1372 + the kernel stack backtrace code. This option is not useful 1373 + for distributions or general kernels, but only for kernel 1374 + developers working on architecture code. 1375 + 1376 + Note that if you want to also test saved backtraces, you will 1377 + have to enable STACKTRACE as well. 1378 + 1379 + Say N if you are unsure. 1390 1380 1391 1381 config RBTREE_TEST 1392 1382 tristate "Red-Black tree test" ··· 1452 1338 depends on m && DEBUG_KERNEL 1453 1339 help 1454 1340 A benchmark measuring the performance of the interval tree library 1341 + 1342 + config ATOMIC64_SELFTEST 1343 + bool "Perform an atomic64_t self-test at boot" 1344 + help 1345 + Enable this option to test the atomic64_t functions at boot. 1346 + 1347 + If unsure, say N. 1348 + 1349 + config ASYNC_RAID6_TEST 1350 + tristate "Self test for hardware accelerated raid6 recovery" 1351 + depends on ASYNC_RAID6_RECOV 1352 + select ASYNC_MEMCPY 1353 + ---help--- 1354 + This is a one-shot self test that permutes through the 1355 + recovery of all the possible two disk failure scenarios for a 1356 + N-disk array. Recovery is performed with the asynchronous 1357 + raid6 recovery routines, and will optionally use an offload 1358 + engine if one is available. 1359 + 1360 + If unsure, say N. 1361 + 1362 + config TEST_STRING_HELPERS 1363 + tristate "Test functions located in the string_helpers module at runtime" 1364 + 1365 + config TEST_KSTRTOX 1366 + tristate "Test kstrto*() family of functions at runtime" 1367 + 1368 + endmenu # runtime tests 1455 1369 1456 1370 config PROVIDE_OHCI1394_DMA_INIT 1457 1371 bool "Remote debugging over FireWire early on boot" ··· 1530 1388 1531 1389 Say N if you are unsure. 1532 1390 1533 - config DYNAMIC_DEBUG 1534 - bool "Enable dynamic printk() support" 1535 - default n 1536 - depends on PRINTK 1537 - depends on DEBUG_FS 1538 - help 1539 - 1540 - Compiles debug level messages into the kernel, which would not 1541 - otherwise be available at runtime. These messages can then be 1542 - enabled/disabled based on various levels of scope - per source file, 1543 - function, module, format string, and line number. This mechanism 1544 - implicitly compiles in all pr_debug() and dev_dbg() calls, which 1545 - enlarges the kernel text size by about 2%. 1546 - 1547 - If a source file is compiled with DEBUG flag set, any 1548 - pr_debug() calls in it are enabled by default, but can be 1549 - disabled at runtime as below. Note that DEBUG flag is 1550 - turned on by many CONFIG_*DEBUG* options. 1551 - 1552 - Usage: 1553 - 1554 - Dynamic debugging is controlled via the 'dynamic_debug/control' file, 1555 - which is contained in the 'debugfs' filesystem. Thus, the debugfs 1556 - filesystem must first be mounted before making use of this feature. 1557 - We refer the control file as: <debugfs>/dynamic_debug/control. This 1558 - file contains a list of the debug statements that can be enabled. The 1559 - format for each line of the file is: 1560 - 1561 - filename:lineno [module]function flags format 1562 - 1563 - filename : source file of the debug statement 1564 - lineno : line number of the debug statement 1565 - module : module that contains the debug statement 1566 - function : function that contains the debug statement 1567 - flags : '=p' means the line is turned 'on' for printing 1568 - format : the format used for the debug statement 1569 - 1570 - From a live system: 1571 - 1572 - nullarbor:~ # cat <debugfs>/dynamic_debug/control 1573 - # filename:lineno [module]function flags format 1574 - fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012" 1575 - fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012" 1576 - fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012" 1577 - 1578 - Example usage: 1579 - 1580 - // enable the message at line 1603 of file svcsock.c 1581 - nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > 1582 - <debugfs>/dynamic_debug/control 1583 - 1584 - // enable all the messages in file svcsock.c 1585 - nullarbor:~ # echo -n 'file svcsock.c +p' > 1586 - <debugfs>/dynamic_debug/control 1587 - 1588 - // enable all the messages in the NFS server module 1589 - nullarbor:~ # echo -n 'module nfsd +p' > 1590 - <debugfs>/dynamic_debug/control 1591 - 1592 - // enable all 12 messages in the function svc_process() 1593 - nullarbor:~ # echo -n 'func svc_process +p' > 1594 - <debugfs>/dynamic_debug/control 1595 - 1596 - // disable all 12 messages in the function svc_process() 1597 - nullarbor:~ # echo -n 'func svc_process -p' > 1598 - <debugfs>/dynamic_debug/control 1599 - 1600 - See Documentation/dynamic-debug-howto.txt for additional information. 1601 - 1602 1391 config DMA_API_DEBUG 1603 1392 bool "Enable debugging of DMA-API usage" 1604 1393 depends on HAVE_DMA_API_DEBUG ··· 1541 1468 This option causes a performance degredation. Use only if you want 1542 1469 to debug device drivers. If unsure, say N. 1543 1470 1544 - config ATOMIC64_SELFTEST 1545 - bool "Perform an atomic64_t self-test at boot" 1546 - help 1547 - Enable this option to test the atomic64_t functions at boot. 1548 - 1549 - If unsure, say N. 1550 - 1551 - config ASYNC_RAID6_TEST 1552 - tristate "Self test for hardware accelerated raid6 recovery" 1553 - depends on ASYNC_RAID6_RECOV 1554 - select ASYNC_MEMCPY 1555 - ---help--- 1556 - This is a one-shot self test that permutes through the 1557 - recovery of all the possible two disk failure scenarios for a 1558 - N-disk array. Recovery is performed with the asynchronous 1559 - raid6 recovery routines, and will optionally use an offload 1560 - engine if one is available. 1561 - 1562 - If unsure, say N. 1563 - 1564 1471 source "samples/Kconfig" 1565 1472 1566 1473 source "lib/Kconfig.kgdb" 1567 1474 1568 - source "lib/Kconfig.kmemcheck" 1569 - 1570 - config TEST_STRING_HELPERS 1571 - tristate "Test functions located in the string_helpers module at runtime" 1572 - 1573 - config TEST_KSTRTOX 1574 - tristate "Test kstrto*() family of functions at runtime"