diff options
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r-- | lib/Kconfig.debug | 1093 |
1 files changed, 576 insertions, 517 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 566cf2bc08ea..1501aa553221 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -1,3 +1,4 @@ | |||
1 | menu "printk and dmesg options" | ||
1 | 2 | ||
2 | config PRINTK_TIME | 3 | config PRINTK_TIME |
3 | bool "Show timing information on printks" | 4 | bool "Show timing information on printks" |
@@ -25,6 +26,123 @@ config DEFAULT_MESSAGE_LOGLEVEL | |||
25 | that are auditing their logs closely may want to set it to a lower | 26 | that are auditing their logs closely may want to set it to a lower |
26 | priority. | 27 | priority. |
27 | 28 | ||
29 | config BOOT_PRINTK_DELAY | ||
30 | bool "Delay each boot printk message by N milliseconds" | ||
31 | depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY | ||
32 | help | ||
33 | This build option allows you to read kernel boot messages | ||
34 | by inserting a short delay after each one. The delay is | ||
35 | specified in milliseconds on the kernel command line, | ||
36 | using "boot_delay=N". | ||
37 | |||
38 | It is likely that you would also need to use "lpj=M" to preset | ||
39 | the "loops per jiffie" value. | ||
40 | See a previous boot log for the "lpj" value to use for your | ||
41 | system, and then set "lpj=M" before setting "boot_delay=N". | ||
42 | NOTE: Using this option may adversely affect SMP systems. | ||
43 | I.e., processors other than the first one may not boot up. | ||
44 | BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect | ||
45 | what it believes to be lockup conditions. | ||
46 | |||
47 | config DYNAMIC_DEBUG | ||
48 | bool "Enable dynamic printk() support" | ||
49 | default n | ||
50 | depends on PRINTK | ||
51 | depends on DEBUG_FS | ||
52 | help | ||
53 | |||
54 | Compiles debug level messages into the kernel, which would not | ||
55 | otherwise be available at runtime. These messages can then be | ||
56 | enabled/disabled based on various levels of scope - per source file, | ||
57 | function, module, format string, and line number. This mechanism | ||
58 | implicitly compiles in all pr_debug() and dev_dbg() calls, which | ||
59 | enlarges the kernel text size by about 2%. | ||
60 | |||
61 | If a source file is compiled with DEBUG flag set, any | ||
62 | pr_debug() calls in it are enabled by default, but can be | ||
63 | disabled at runtime as below. Note that DEBUG flag is | ||
64 | turned on by many CONFIG_*DEBUG* options. | ||
65 | |||
66 | Usage: | ||
67 | |||
68 | Dynamic debugging is controlled via the 'dynamic_debug/control' file, | ||
69 | which is contained in the 'debugfs' filesystem. Thus, the debugfs | ||
70 | filesystem must first be mounted before making use of this feature. | ||
71 | We refer the control file as: <debugfs>/dynamic_debug/control. This | ||
72 | file contains a list of the debug statements that can be enabled. The | ||
73 | format for each line of the file is: | ||
74 | |||
75 | filename:lineno [module]function flags format | ||
76 | |||
77 | filename : source file of the debug statement | ||
78 | lineno : line number of the debug statement | ||
79 | module : module that contains the debug statement | ||
80 | function : function that contains the debug statement | ||
81 | flags : '=p' means the line is turned 'on' for printing | ||
82 | format : the format used for the debug statement | ||
83 | |||
84 | From a live system: | ||
85 | |||
86 | nullarbor:~ # cat <debugfs>/dynamic_debug/control | ||
87 | # filename:lineno [module]function flags format | ||
88 | fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012" | ||
89 | fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012" | ||
90 | fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012" | ||
91 | |||
92 | Example usage: | ||
93 | |||
94 | // enable the message at line 1603 of file svcsock.c | ||
95 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > | ||
96 | <debugfs>/dynamic_debug/control | ||
97 | |||
98 | // enable all the messages in file svcsock.c | ||
99 | nullarbor:~ # echo -n 'file svcsock.c +p' > | ||
100 | <debugfs>/dynamic_debug/control | ||
101 | |||
102 | // enable all the messages in the NFS server module | ||
103 | nullarbor:~ # echo -n 'module nfsd +p' > | ||
104 | <debugfs>/dynamic_debug/control | ||
105 | |||
106 | // enable all 12 messages in the function svc_process() | ||
107 | nullarbor:~ # echo -n 'func svc_process +p' > | ||
108 | <debugfs>/dynamic_debug/control | ||
109 | |||
110 | // disable all 12 messages in the function svc_process() | ||
111 | nullarbor:~ # echo -n 'func svc_process -p' > | ||
112 | <debugfs>/dynamic_debug/control | ||
113 | |||
114 | See Documentation/dynamic-debug-howto.txt for additional information. | ||
115 | |||
116 | endmenu # "printk and dmesg options" | ||
117 | |||
118 | menu "Compile-time checks and compiler options" | ||
119 | |||
120 | config DEBUG_INFO | ||
121 | bool "Compile the kernel with debug info" | ||
122 | depends on DEBUG_KERNEL | ||
123 | help | ||
124 | If you say Y here the resulting kernel image will include | ||
125 | debugging info resulting in a larger kernel image. | ||
126 | This adds debug symbols to the kernel and modules (gcc -g), and | ||
127 | is needed if you intend to use kernel crashdump or binary object | ||
128 | tools like crash, kgdb, LKCD, gdb, etc on the kernel. | ||
129 | Say Y here only if you plan to debug the kernel. | ||
130 | |||
131 | If unsure, say N. | ||
132 | |||
133 | config DEBUG_INFO_REDUCED | ||
134 | bool "Reduce debugging information" | ||
135 | depends on DEBUG_INFO | ||
136 | help | ||
137 | If you say Y here gcc is instructed to generate less debugging | ||
138 | information for structure types. This means that tools that | ||
139 | need full debugging information (like kgdb or systemtap) won't | ||
140 | be happy. But if you merely need debugging information to | ||
141 | resolve line numbers there is no loss. Advantage is that | ||
142 | build directory object sizes shrink dramatically over a full | ||
143 | DEBUG_INFO build and compile times are reduced too. | ||
144 | Only works with newer gcc versions. | ||
145 | |||
28 | config ENABLE_WARN_DEPRECATED | 146 | config ENABLE_WARN_DEPRECATED |
29 | bool "Enable __deprecated logic" | 147 | bool "Enable __deprecated logic" |
30 | default y | 148 | default y |
@@ -52,20 +170,6 @@ config FRAME_WARN | |||
52 | Setting it to 0 disables the warning. | 170 | Setting it to 0 disables the warning. |
53 | Requires gcc 4.4 | 171 | Requires gcc 4.4 |
54 | 172 | ||
55 | config MAGIC_SYSRQ | ||
56 | bool "Magic SysRq key" | ||
57 | depends on !UML | ||
58 | help | ||
59 | If you say Y here, you will have some control over the system even | ||
60 | if the system crashes for example during kernel debugging (e.g., you | ||
61 | will be able to flush the buffer cache to disk, reboot the system | ||
62 | immediately or dump some status information). This is accomplished | ||
63 | by pressing various keys while holding SysRq (Alt+PrintScreen). It | ||
64 | also works on a serial console (on PC hardware at least), if you | ||
65 | send a BREAK and then within 5 seconds a command keypress. The | ||
66 | keys are documented in <file:Documentation/sysrq.txt>. Don't say Y | ||
67 | unless you really know what this hack does. | ||
68 | |||
69 | config STRIP_ASM_SYMS | 173 | config STRIP_ASM_SYMS |
70 | bool "Strip assembler-generated symbols during link" | 174 | bool "Strip assembler-generated symbols during link" |
71 | default n | 175 | default n |
@@ -134,7 +238,7 @@ config DEBUG_SECTION_MISMATCH | |||
134 | any use of code/data previously in these sections would | 238 | any use of code/data previously in these sections would |
135 | most likely result in an oops. | 239 | most likely result in an oops. |
136 | In the code, functions and variables are annotated with | 240 | In the code, functions and variables are annotated with |
137 | __init, __cpuinit, etc. (see the full list in include/linux/init.h), | 241 | __init,, etc. (see the full list in include/linux/init.h), |
138 | which results in the code/data being placed in specific sections. | 242 | which results in the code/data being placed in specific sections. |
139 | The section mismatch analysis is always performed after a full | 243 | The section mismatch analysis is always performed after a full |
140 | kernel build, and enabling this option causes the following | 244 | kernel build, and enabling this option causes the following |
@@ -156,12 +260,341 @@ config DEBUG_SECTION_MISMATCH | |||
156 | - Enable verbose reporting from modpost in order to help resolve | 260 | - Enable verbose reporting from modpost in order to help resolve |
157 | the section mismatches that are reported. | 261 | the section mismatches that are reported. |
158 | 262 | ||
263 | # | ||
264 | # Select this config option from the architecture Kconfig, if it | ||
265 | # is preferred to always offer frame pointers as a config | ||
266 | # option on the architecture (regardless of KERNEL_DEBUG): | ||
267 | # | ||
268 | config ARCH_WANT_FRAME_POINTERS | ||
269 | bool | ||
270 | help | ||
271 | |||
272 | config FRAME_POINTER | ||
273 | bool "Compile the kernel with frame pointers" | ||
274 | depends on DEBUG_KERNEL && \ | ||
275 | (CRIS || M68K || FRV || UML || \ | ||
276 | AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \ | ||
277 | ARCH_WANT_FRAME_POINTERS | ||
278 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | ||
279 | help | ||
280 | If you say Y here the resulting kernel image will be slightly | ||
281 | larger and slower, but it gives very useful debugging information | ||
282 | in case of kernel bugs. (precise oopses/stacktraces/warnings) | ||
283 | |||
284 | config DEBUG_FORCE_WEAK_PER_CPU | ||
285 | bool "Force weak per-cpu definitions" | ||
286 | depends on DEBUG_KERNEL | ||
287 | help | ||
288 | s390 and alpha require percpu variables in modules to be | ||
289 | defined weak to work around addressing range issue which | ||
290 | puts the following two restrictions on percpu variable | ||
291 | definitions. | ||
292 | |||
293 | 1. percpu symbols must be unique whether static or not | ||
294 | 2. percpu variables can't be defined inside a function | ||
295 | |||
296 | To ensure that generic code follows the above rules, this | ||
297 | option forces all percpu variables to be defined as weak. | ||
298 | |||
299 | endmenu # "Compiler options" | ||
300 | |||
301 | config MAGIC_SYSRQ | ||
302 | bool "Magic SysRq key" | ||
303 | depends on !UML | ||
304 | help | ||
305 | If you say Y here, you will have some control over the system even | ||
306 | if the system crashes for example during kernel debugging (e.g., you | ||
307 | will be able to flush the buffer cache to disk, reboot the system | ||
308 | immediately or dump some status information). This is accomplished | ||
309 | by pressing various keys while holding SysRq (Alt+PrintScreen). It | ||
310 | also works on a serial console (on PC hardware at least), if you | ||
311 | send a BREAK and then within 5 seconds a command keypress. The | ||
312 | keys are documented in <file:Documentation/sysrq.txt>. Don't say Y | ||
313 | unless you really know what this hack does. | ||
314 | |||
159 | config DEBUG_KERNEL | 315 | config DEBUG_KERNEL |
160 | bool "Kernel debugging" | 316 | bool "Kernel debugging" |
161 | help | 317 | help |
162 | Say Y here if you are developing drivers or trying to debug and | 318 | Say Y here if you are developing drivers or trying to debug and |
163 | identify kernel problems. | 319 | identify kernel problems. |
164 | 320 | ||
321 | menu "Memory Debugging" | ||
322 | |||
323 | source mm/Kconfig.debug | ||
324 | |||
325 | config DEBUG_OBJECTS | ||
326 | bool "Debug object operations" | ||
327 | depends on DEBUG_KERNEL | ||
328 | help | ||
329 | If you say Y here, additional code will be inserted into the | ||
330 | kernel to track the life time of various objects and validate | ||
331 | the operations on those objects. | ||
332 | |||
333 | config DEBUG_OBJECTS_SELFTEST | ||
334 | bool "Debug objects selftest" | ||
335 | depends on DEBUG_OBJECTS | ||
336 | help | ||
337 | This enables the selftest of the object debug code. | ||
338 | |||
339 | config DEBUG_OBJECTS_FREE | ||
340 | bool "Debug objects in freed memory" | ||
341 | depends on DEBUG_OBJECTS | ||
342 | help | ||
343 | This enables checks whether a k/v free operation frees an area | ||
344 | which contains an object which has not been deactivated | ||
345 | properly. This can make kmalloc/kfree-intensive workloads | ||
346 | much slower. | ||
347 | |||
348 | config DEBUG_OBJECTS_TIMERS | ||
349 | bool "Debug timer objects" | ||
350 | depends on DEBUG_OBJECTS | ||
351 | help | ||
352 | If you say Y here, additional code will be inserted into the | ||
353 | timer routines to track the life time of timer objects and | ||
354 | validate the timer operations. | ||
355 | |||
356 | config DEBUG_OBJECTS_WORK | ||
357 | bool "Debug work objects" | ||
358 | depends on DEBUG_OBJECTS | ||
359 | help | ||
360 | If you say Y here, additional code will be inserted into the | ||
361 | work queue routines to track the life time of work objects and | ||
362 | validate the work operations. | ||
363 | |||
364 | config DEBUG_OBJECTS_RCU_HEAD | ||
365 | bool "Debug RCU callbacks objects" | ||
366 | depends on DEBUG_OBJECTS | ||
367 | help | ||
368 | Enable this to turn on debugging of RCU list heads (call_rcu() usage). | ||
369 | |||
370 | config DEBUG_OBJECTS_PERCPU_COUNTER | ||
371 | bool "Debug percpu counter objects" | ||
372 | depends on DEBUG_OBJECTS | ||
373 | help | ||
374 | If you say Y here, additional code will be inserted into the | ||
375 | percpu counter routines to track the life time of percpu counter | ||
376 | objects and validate the percpu counter operations. | ||
377 | |||
378 | config DEBUG_OBJECTS_ENABLE_DEFAULT | ||
379 | int "debug_objects bootup default value (0-1)" | ||
380 | range 0 1 | ||
381 | default "1" | ||
382 | depends on DEBUG_OBJECTS | ||
383 | help | ||
384 | Debug objects boot parameter default value | ||
385 | |||
386 | config DEBUG_SLAB | ||
387 | bool "Debug slab memory allocations" | ||
388 | depends on DEBUG_KERNEL && SLAB && !KMEMCHECK | ||
389 | help | ||
390 | Say Y here to have the kernel do limited verification on memory | ||
391 | allocation as well as poisoning memory on free to catch use of freed | ||
392 | memory. This can make kmalloc/kfree-intensive workloads much slower. | ||
393 | |||
394 | config DEBUG_SLAB_LEAK | ||
395 | bool "Memory leak debugging" | ||
396 | depends on DEBUG_SLAB | ||
397 | |||
398 | config SLUB_DEBUG_ON | ||
399 | bool "SLUB debugging on by default" | ||
400 | depends on SLUB && SLUB_DEBUG && !KMEMCHECK | ||
401 | default n | ||
402 | help | ||
403 | Boot with debugging on by default. SLUB boots by default with | ||
404 | the runtime debug capabilities switched off. Enabling this is | ||
405 | equivalent to specifying the "slub_debug" parameter on boot. | ||
406 | There is no support for more fine grained debug control like | ||
407 | possible with slub_debug=xxx. SLUB debugging may be switched | ||
408 | off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying | ||
409 | "slub_debug=-". | ||
410 | |||
411 | config SLUB_STATS | ||
412 | default n | ||
413 | bool "Enable SLUB performance statistics" | ||
414 | depends on SLUB && SYSFS | ||
415 | help | ||
416 | SLUB statistics are useful to debug SLUBs allocation behavior in | ||
417 | order find ways to optimize the allocator. This should never be | ||
418 | enabled for production use since keeping statistics slows down | ||
419 | the allocator by a few percentage points. The slabinfo command | ||
420 | supports the determination of the most active slabs to figure | ||
421 | out which slabs are relevant to a particular load. | ||
422 | Try running: slabinfo -DA | ||
423 | |||
424 | config HAVE_DEBUG_KMEMLEAK | ||
425 | bool | ||
426 | |||
427 | config DEBUG_KMEMLEAK | ||
428 | bool "Kernel memory leak detector" | ||
429 | depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK | ||
430 | select DEBUG_FS | ||
431 | select STACKTRACE if STACKTRACE_SUPPORT | ||
432 | select KALLSYMS | ||
433 | select CRC32 | ||
434 | help | ||
435 | Say Y here if you want to enable the memory leak | ||
436 | detector. The memory allocation/freeing is traced in a way | ||
437 | similar to the Boehm's conservative garbage collector, the | ||
438 | difference being that the orphan objects are not freed but | ||
439 | only shown in /sys/kernel/debug/kmemleak. Enabling this | ||
440 | feature will introduce an overhead to memory | ||
441 | allocations. See Documentation/kmemleak.txt for more | ||
442 | details. | ||
443 | |||
444 | Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances | ||
445 | of finding leaks due to the slab objects poisoning. | ||
446 | |||
447 | In order to access the kmemleak file, debugfs needs to be | ||
448 | mounted (usually at /sys/kernel/debug). | ||
449 | |||
450 | config DEBUG_KMEMLEAK_EARLY_LOG_SIZE | ||
451 | int "Maximum kmemleak early log entries" | ||
452 | depends on DEBUG_KMEMLEAK | ||
453 | range 200 40000 | ||
454 | default 400 | ||
455 | help | ||
456 | Kmemleak must track all the memory allocations to avoid | ||
457 | reporting false positives. Since memory may be allocated or | ||
458 | freed before kmemleak is initialised, an early log buffer is | ||
459 | used to store these actions. If kmemleak reports "early log | ||
460 | buffer exceeded", please increase this value. | ||
461 | |||
462 | config DEBUG_KMEMLEAK_TEST | ||
463 | tristate "Simple test for the kernel memory leak detector" | ||
464 | depends on DEBUG_KMEMLEAK && m | ||
465 | help | ||
466 | This option enables a module that explicitly leaks memory. | ||
467 | |||
468 | If unsure, say N. | ||
469 | |||
470 | config DEBUG_KMEMLEAK_DEFAULT_OFF | ||
471 | bool "Default kmemleak to off" | ||
472 | depends on DEBUG_KMEMLEAK | ||
473 | help | ||
474 | Say Y here to disable kmemleak by default. It can then be enabled | ||
475 | on the command line via kmemleak=on. | ||
476 | |||
477 | config DEBUG_STACK_USAGE | ||
478 | bool "Stack utilization instrumentation" | ||
479 | depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG | ||
480 | help | ||
481 | Enables the display of the minimum amount of free stack which each | ||
482 | task has ever had available in the sysrq-T and sysrq-P debug output. | ||
483 | |||
484 | This option will slow down process creation somewhat. | ||
485 | |||
486 | config DEBUG_VM | ||
487 | bool "Debug VM" | ||
488 | depends on DEBUG_KERNEL | ||
489 | help | ||
490 | Enable this to turn on extended checks in the virtual-memory system | ||
491 | that may impact performance. | ||
492 | |||
493 | If unsure, say N. | ||
494 | |||
495 | config DEBUG_VM_RB | ||
496 | bool "Debug VM red-black trees" | ||
497 | depends on DEBUG_VM | ||
498 | help | ||
499 | Enable this to turn on more extended checks in the virtual-memory | ||
500 | system that may impact performance. | ||
501 | |||
502 | If unsure, say N. | ||
503 | |||
504 | config DEBUG_VIRTUAL | ||
505 | bool "Debug VM translations" | ||
506 | depends on DEBUG_KERNEL && X86 | ||
507 | help | ||
508 | Enable some costly sanity checks in virtual to page code. This can | ||
509 | catch mistakes with virt_to_page() and friends. | ||
510 | |||
511 | If unsure, say N. | ||
512 | |||
513 | config DEBUG_NOMMU_REGIONS | ||
514 | bool "Debug the global anon/private NOMMU mapping region tree" | ||
515 | depends on DEBUG_KERNEL && !MMU | ||
516 | help | ||
517 | This option causes the global tree of anonymous and private mapping | ||
518 | regions to be regularly checked for invalid topology. | ||
519 | |||
520 | config DEBUG_MEMORY_INIT | ||
521 | bool "Debug memory initialisation" if EXPERT | ||
522 | default !EXPERT | ||
523 | help | ||
524 | Enable this for additional checks during memory initialisation. | ||
525 | The sanity checks verify aspects of the VM such as the memory model | ||
526 | and other information provided by the architecture. Verbose | ||
527 | information will be printed at KERN_DEBUG loglevel depending | ||
528 | on the mminit_loglevel= command-line option. | ||
529 | |||
530 | If unsure, say Y | ||
531 | |||
532 | config MEMORY_NOTIFIER_ERROR_INJECT | ||
533 | tristate "Memory hotplug notifier error injection module" | ||
534 | depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION | ||
535 | help | ||
536 | This option provides the ability to inject artificial errors to | ||
537 | memory hotplug notifier chain callbacks. It is controlled through | ||
538 | debugfs interface under /sys/kernel/debug/notifier-error-inject/memory | ||
539 | |||
540 | If the notifier call chain should be failed with some events | ||
541 | notified, write the error code to "actions/<notifier event>/error". | ||
542 | |||
543 | Example: Inject memory hotplug offline error (-12 == -ENOMEM) | ||
544 | |||
545 | # cd /sys/kernel/debug/notifier-error-inject/memory | ||
546 | # echo -12 > actions/MEM_GOING_OFFLINE/error | ||
547 | # echo offline > /sys/devices/system/memory/memoryXXX/state | ||
548 | bash: echo: write error: Cannot allocate memory | ||
549 | |||
550 | To compile this code as a module, choose M here: the module will | ||
551 | be called memory-notifier-error-inject. | ||
552 | |||
553 | If unsure, say N. | ||
554 | |||
555 | config DEBUG_PER_CPU_MAPS | ||
556 | bool "Debug access to per_cpu maps" | ||
557 | depends on DEBUG_KERNEL | ||
558 | depends on SMP | ||
559 | help | ||
560 | Say Y to verify that the per_cpu map being accessed has | ||
561 | been set up. This adds a fair amount of code to kernel memory | ||
562 | and decreases performance. | ||
563 | |||
564 | Say N if unsure. | ||
565 | |||
566 | config DEBUG_HIGHMEM | ||
567 | bool "Highmem debugging" | ||
568 | depends on DEBUG_KERNEL && HIGHMEM | ||
569 | help | ||
570 | This options enables addition error checking for high memory systems. | ||
571 | Disable for production systems. | ||
572 | |||
573 | config HAVE_DEBUG_STACKOVERFLOW | ||
574 | bool | ||
575 | |||
576 | config DEBUG_STACKOVERFLOW | ||
577 | bool "Check for stack overflows" | ||
578 | depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW | ||
579 | ---help--- | ||
580 | Say Y here if you want to check for overflows of kernel, IRQ | ||
581 | and exception stacks (if your archicture uses them). This | ||
582 | option will show detailed messages if free stack space drops | ||
583 | below a certain limit. | ||
584 | |||
585 | These kinds of bugs usually occur when call-chains in the | ||
586 | kernel get too deep, especially when interrupts are | ||
587 | involved. | ||
588 | |||
589 | Use this in cases where you see apparently random memory | ||
590 | corruption, especially if it appears in 'struct thread_info' | ||
591 | |||
592 | If in doubt, say "N". | ||
593 | |||
594 | source "lib/Kconfig.kmemcheck" | ||
595 | |||
596 | endmenu # "Memory Debugging" | ||
597 | |||
165 | config DEBUG_SHIRQ | 598 | config DEBUG_SHIRQ |
166 | bool "Debug shared IRQ handlers" | 599 | bool "Debug shared IRQ handlers" |
167 | depends on DEBUG_KERNEL && GENERIC_HARDIRQS | 600 | depends on DEBUG_KERNEL && GENERIC_HARDIRQS |
@@ -171,6 +604,8 @@ config DEBUG_SHIRQ | |||
171 | Drivers ought to be able to handle interrupts coming in at those | 604 | Drivers ought to be able to handle interrupts coming in at those |
172 | points; some don't and need to be caught. | 605 | points; some don't and need to be caught. |
173 | 606 | ||
607 | menu "Debug Lockups and Hangs" | ||
608 | |||
174 | config LOCKUP_DETECTOR | 609 | config LOCKUP_DETECTOR |
175 | bool "Detect Hard and Soft Lockups" | 610 | bool "Detect Hard and Soft Lockups" |
176 | depends on DEBUG_KERNEL && !S390 | 611 | depends on DEBUG_KERNEL && !S390 |
@@ -242,25 +677,6 @@ config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE | |||
242 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC | 677 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC |
243 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC | 678 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC |
244 | 679 | ||
245 | config PANIC_ON_OOPS | ||
246 | bool "Panic on Oops" | ||
247 | help | ||
248 | Say Y here to enable the kernel to panic when it oopses. This | ||
249 | has the same effect as setting oops=panic on the kernel command | ||
250 | line. | ||
251 | |||
252 | This feature is useful to ensure that the kernel does not do | ||
253 | anything erroneous after an oops which could result in data | ||
254 | corruption or other issues. | ||
255 | |||
256 | Say N if unsure. | ||
257 | |||
258 | config PANIC_ON_OOPS_VALUE | ||
259 | int | ||
260 | range 0 1 | ||
261 | default 0 if !PANIC_ON_OOPS | ||
262 | default 1 if PANIC_ON_OOPS | ||
263 | |||
264 | config DETECT_HUNG_TASK | 680 | config DETECT_HUNG_TASK |
265 | bool "Detect Hung Tasks" | 681 | bool "Detect Hung Tasks" |
266 | depends on DEBUG_KERNEL | 682 | depends on DEBUG_KERNEL |
@@ -315,6 +731,27 @@ config BOOTPARAM_HUNG_TASK_PANIC_VALUE | |||
315 | default 0 if !BOOTPARAM_HUNG_TASK_PANIC | 731 | default 0 if !BOOTPARAM_HUNG_TASK_PANIC |
316 | default 1 if BOOTPARAM_HUNG_TASK_PANIC | 732 | default 1 if BOOTPARAM_HUNG_TASK_PANIC |
317 | 733 | ||
734 | endmenu # "Debug lockups and hangs" | ||
735 | |||
736 | config PANIC_ON_OOPS | ||
737 | bool "Panic on Oops" | ||
738 | help | ||
739 | Say Y here to enable the kernel to panic when it oopses. This | ||
740 | has the same effect as setting oops=panic on the kernel command | ||
741 | line. | ||
742 | |||
743 | This feature is useful to ensure that the kernel does not do | ||
744 | anything erroneous after an oops which could result in data | ||
745 | corruption or other issues. | ||
746 | |||
747 | Say N if unsure. | ||
748 | |||
749 | config PANIC_ON_OOPS_VALUE | ||
750 | int | ||
751 | range 0 1 | ||
752 | default 0 if !PANIC_ON_OOPS | ||
753 | default 1 if PANIC_ON_OOPS | ||
754 | |||
318 | config SCHED_DEBUG | 755 | config SCHED_DEBUG |
319 | bool "Collect scheduler debugging info" | 756 | bool "Collect scheduler debugging info" |
320 | depends on DEBUG_KERNEL && PROC_FS | 757 | depends on DEBUG_KERNEL && PROC_FS |
@@ -350,158 +787,6 @@ config TIMER_STATS | |||
350 | (it defaults to deactivated on bootup and will only be activated | 787 | (it defaults to deactivated on bootup and will only be activated |
351 | if some application like powertop activates it explicitly). | 788 | if some application like powertop activates it explicitly). |
352 | 789 | ||
353 | config DEBUG_OBJECTS | ||
354 | bool "Debug object operations" | ||
355 | depends on DEBUG_KERNEL | ||
356 | help | ||
357 | If you say Y here, additional code will be inserted into the | ||
358 | kernel to track the life time of various objects and validate | ||
359 | the operations on those objects. | ||
360 | |||
361 | config DEBUG_OBJECTS_SELFTEST | ||
362 | bool "Debug objects selftest" | ||
363 | depends on DEBUG_OBJECTS | ||
364 | help | ||
365 | This enables the selftest of the object debug code. | ||
366 | |||
367 | config DEBUG_OBJECTS_FREE | ||
368 | bool "Debug objects in freed memory" | ||
369 | depends on DEBUG_OBJECTS | ||
370 | help | ||
371 | This enables checks whether a k/v free operation frees an area | ||
372 | which contains an object which has not been deactivated | ||
373 | properly. This can make kmalloc/kfree-intensive workloads | ||
374 | much slower. | ||
375 | |||
376 | config DEBUG_OBJECTS_TIMERS | ||
377 | bool "Debug timer objects" | ||
378 | depends on DEBUG_OBJECTS | ||
379 | help | ||
380 | If you say Y here, additional code will be inserted into the | ||
381 | timer routines to track the life time of timer objects and | ||
382 | validate the timer operations. | ||
383 | |||
384 | config DEBUG_OBJECTS_WORK | ||
385 | bool "Debug work objects" | ||
386 | depends on DEBUG_OBJECTS | ||
387 | help | ||
388 | If you say Y here, additional code will be inserted into the | ||
389 | work queue routines to track the life time of work objects and | ||
390 | validate the work operations. | ||
391 | |||
392 | config DEBUG_OBJECTS_RCU_HEAD | ||
393 | bool "Debug RCU callbacks objects" | ||
394 | depends on DEBUG_OBJECTS | ||
395 | help | ||
396 | Enable this to turn on debugging of RCU list heads (call_rcu() usage). | ||
397 | |||
398 | config DEBUG_OBJECTS_PERCPU_COUNTER | ||
399 | bool "Debug percpu counter objects" | ||
400 | depends on DEBUG_OBJECTS | ||
401 | help | ||
402 | If you say Y here, additional code will be inserted into the | ||
403 | percpu counter routines to track the life time of percpu counter | ||
404 | objects and validate the percpu counter operations. | ||
405 | |||
406 | config DEBUG_OBJECTS_ENABLE_DEFAULT | ||
407 | int "debug_objects bootup default value (0-1)" | ||
408 | range 0 1 | ||
409 | default "1" | ||
410 | depends on DEBUG_OBJECTS | ||
411 | help | ||
412 | Debug objects boot parameter default value | ||
413 | |||
414 | config DEBUG_SLAB | ||
415 | bool "Debug slab memory allocations" | ||
416 | depends on DEBUG_KERNEL && SLAB && !KMEMCHECK | ||
417 | help | ||
418 | Say Y here to have the kernel do limited verification on memory | ||
419 | allocation as well as poisoning memory on free to catch use of freed | ||
420 | memory. This can make kmalloc/kfree-intensive workloads much slower. | ||
421 | |||
422 | config DEBUG_SLAB_LEAK | ||
423 | bool "Memory leak debugging" | ||
424 | depends on DEBUG_SLAB | ||
425 | |||
426 | config SLUB_DEBUG_ON | ||
427 | bool "SLUB debugging on by default" | ||
428 | depends on SLUB && SLUB_DEBUG && !KMEMCHECK | ||
429 | default n | ||
430 | help | ||
431 | Boot with debugging on by default. SLUB boots by default with | ||
432 | the runtime debug capabilities switched off. Enabling this is | ||
433 | equivalent to specifying the "slub_debug" parameter on boot. | ||
434 | There is no support for more fine grained debug control like | ||
435 | possible with slub_debug=xxx. SLUB debugging may be switched | ||
436 | off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying | ||
437 | "slub_debug=-". | ||
438 | |||
439 | config SLUB_STATS | ||
440 | default n | ||
441 | bool "Enable SLUB performance statistics" | ||
442 | depends on SLUB && SYSFS | ||
443 | help | ||
444 | SLUB statistics are useful to debug SLUBs allocation behavior in | ||
445 | order find ways to optimize the allocator. This should never be | ||
446 | enabled for production use since keeping statistics slows down | ||
447 | the allocator by a few percentage points. The slabinfo command | ||
448 | supports the determination of the most active slabs to figure | ||
449 | out which slabs are relevant to a particular load. | ||
450 | Try running: slabinfo -DA | ||
451 | |||
452 | config HAVE_DEBUG_KMEMLEAK | ||
453 | bool | ||
454 | |||
455 | config DEBUG_KMEMLEAK | ||
456 | bool "Kernel memory leak detector" | ||
457 | depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK | ||
458 | select DEBUG_FS | ||
459 | select STACKTRACE if STACKTRACE_SUPPORT | ||
460 | select KALLSYMS | ||
461 | select CRC32 | ||
462 | help | ||
463 | Say Y here if you want to enable the memory leak | ||
464 | detector. The memory allocation/freeing is traced in a way | ||
465 | similar to the Boehm's conservative garbage collector, the | ||
466 | difference being that the orphan objects are not freed but | ||
467 | only shown in /sys/kernel/debug/kmemleak. Enabling this | ||
468 | feature will introduce an overhead to memory | ||
469 | allocations. See Documentation/kmemleak.txt for more | ||
470 | details. | ||
471 | |||
472 | Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances | ||
473 | of finding leaks due to the slab objects poisoning. | ||
474 | |||
475 | In order to access the kmemleak file, debugfs needs to be | ||
476 | mounted (usually at /sys/kernel/debug). | ||
477 | |||
478 | config DEBUG_KMEMLEAK_EARLY_LOG_SIZE | ||
479 | int "Maximum kmemleak early log entries" | ||
480 | depends on DEBUG_KMEMLEAK | ||
481 | range 200 40000 | ||
482 | default 400 | ||
483 | help | ||
484 | Kmemleak must track all the memory allocations to avoid | ||
485 | reporting false positives. Since memory may be allocated or | ||
486 | freed before kmemleak is initialised, an early log buffer is | ||
487 | used to store these actions. If kmemleak reports "early log | ||
488 | buffer exceeded", please increase this value. | ||
489 | |||
490 | config DEBUG_KMEMLEAK_TEST | ||
491 | tristate "Simple test for the kernel memory leak detector" | ||
492 | depends on DEBUG_KMEMLEAK && m | ||
493 | help | ||
494 | This option enables a module that explicitly leaks memory. | ||
495 | |||
496 | If unsure, say N. | ||
497 | |||
498 | config DEBUG_KMEMLEAK_DEFAULT_OFF | ||
499 | bool "Default kmemleak to off" | ||
500 | depends on DEBUG_KMEMLEAK | ||
501 | help | ||
502 | Say Y here to disable kmemleak by default. It can then be enabled | ||
503 | on the command line via kmemleak=on. | ||
504 | |||
505 | config DEBUG_PREEMPT | 790 | config DEBUG_PREEMPT |
506 | bool "Debug preemptible kernel" | 791 | bool "Debug preemptible kernel" |
507 | depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT | 792 | depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT |
@@ -512,6 +797,8 @@ config DEBUG_PREEMPT | |||
512 | if kernel code uses it in a preemption-unsafe way. Also, the kernel | 797 | if kernel code uses it in a preemption-unsafe way. Also, the kernel |
513 | will detect preemption count underflows. | 798 | will detect preemption count underflows. |
514 | 799 | ||
800 | menu "Lock Debugging (spinlocks, mutexes, etc...)" | ||
801 | |||
515 | config DEBUG_RT_MUTEXES | 802 | config DEBUG_RT_MUTEXES |
516 | bool "RT Mutex debugging, deadlock detection" | 803 | bool "RT Mutex debugging, deadlock detection" |
517 | depends on DEBUG_KERNEL && RT_MUTEXES | 804 | depends on DEBUG_KERNEL && RT_MUTEXES |
@@ -547,6 +834,19 @@ config DEBUG_MUTEXES | |||
547 | This feature allows mutex semantics violations to be detected and | 834 | This feature allows mutex semantics violations to be detected and |
548 | reported. | 835 | reported. |
549 | 836 | ||
837 | config DEBUG_WW_MUTEX_SLOWPATH | ||
838 | bool "Wait/wound mutex debugging: Slowpath testing" | ||
839 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | ||
840 | select DEBUG_LOCK_ALLOC | ||
841 | select DEBUG_SPINLOCK | ||
842 | select DEBUG_MUTEXES | ||
843 | help | ||
844 | This feature enables slowpath testing for w/w mutex users by | ||
845 | injecting additional -EDEADLK wound/backoff cases. Together with | ||
846 | the full mutex checks enabled with (CONFIG_PROVE_LOCKING) this | ||
847 | will test all possible w/w mutex interface abuse with the | ||
848 | exception of simply not acquiring all the required locks. | ||
849 | |||
550 | config DEBUG_LOCK_ALLOC | 850 | config DEBUG_LOCK_ALLOC |
551 | bool "Lock debugging: detect incorrect freeing of live locks" | 851 | bool "Lock debugging: detect incorrect freeing of live locks" |
552 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 852 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |
@@ -641,12 +941,6 @@ config DEBUG_LOCKDEP | |||
641 | additional runtime checks to debug itself, at the price | 941 | additional runtime checks to debug itself, at the price |
642 | of more runtime overhead. | 942 | of more runtime overhead. |
643 | 943 | ||
644 | config TRACE_IRQFLAGS | ||
645 | bool | ||
646 | help | ||
647 | Enables hooks to interrupt enabling and disabling for | ||
648 | either tracing or lock debugging. | ||
649 | |||
650 | config DEBUG_ATOMIC_SLEEP | 944 | config DEBUG_ATOMIC_SLEEP |
651 | bool "Sleep inside atomic section checking" | 945 | bool "Sleep inside atomic section checking" |
652 | select PREEMPT_COUNT | 946 | select PREEMPT_COUNT |
@@ -668,18 +962,17 @@ config DEBUG_LOCKING_API_SELFTESTS | |||
668 | The following locking APIs are covered: spinlocks, rwlocks, | 962 | The following locking APIs are covered: spinlocks, rwlocks, |
669 | mutexes and rwsems. | 963 | mutexes and rwsems. |
670 | 964 | ||
671 | config STACKTRACE | 965 | endmenu # lock debugging |
672 | bool | ||
673 | depends on STACKTRACE_SUPPORT | ||
674 | 966 | ||
675 | config DEBUG_STACK_USAGE | 967 | config TRACE_IRQFLAGS |
676 | bool "Stack utilization instrumentation" | 968 | bool |
677 | depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG | ||
678 | help | 969 | help |
679 | Enables the display of the minimum amount of free stack which each | 970 | Enables hooks to interrupt enabling and disabling for |
680 | task has ever had available in the sysrq-T and sysrq-P debug output. | 971 | either tracing or lock debugging. |
681 | 972 | ||
682 | This option will slow down process creation somewhat. | 973 | config STACKTRACE |
974 | bool | ||
975 | depends on STACKTRACE_SUPPORT | ||
683 | 976 | ||
684 | config DEBUG_KOBJECT | 977 | config DEBUG_KOBJECT |
685 | bool "kobject debugging" | 978 | bool "kobject debugging" |
@@ -688,13 +981,6 @@ config DEBUG_KOBJECT | |||
688 | If you say Y here, some extra kobject debugging messages will be sent | 981 | If you say Y here, some extra kobject debugging messages will be sent |
689 | to the syslog. | 982 | to the syslog. |
690 | 983 | ||
691 | config DEBUG_HIGHMEM | ||
692 | bool "Highmem debugging" | ||
693 | depends on DEBUG_KERNEL && HIGHMEM | ||
694 | help | ||
695 | This options enables addition error checking for high memory systems. | ||
696 | Disable for production systems. | ||
697 | |||
698 | config HAVE_DEBUG_BUGVERBOSE | 984 | config HAVE_DEBUG_BUGVERBOSE |
699 | bool | 985 | bool |
700 | 986 | ||
@@ -707,66 +993,6 @@ config DEBUG_BUGVERBOSE | |||
707 | of the BUG call as well as the EIP and oops trace. This aids | 993 | of the BUG call as well as the EIP and oops trace. This aids |
708 | debugging but costs about 70-100K of memory. | 994 | debugging but costs about 70-100K of memory. |
709 | 995 | ||
710 | config DEBUG_INFO | ||
711 | bool "Compile the kernel with debug info" | ||
712 | depends on DEBUG_KERNEL | ||
713 | help | ||
714 | If you say Y here the resulting kernel image will include | ||
715 | debugging info resulting in a larger kernel image. | ||
716 | This adds debug symbols to the kernel and modules (gcc -g), and | ||
717 | is needed if you intend to use kernel crashdump or binary object | ||
718 | tools like crash, kgdb, LKCD, gdb, etc on the kernel. | ||
719 | Say Y here only if you plan to debug the kernel. | ||
720 | |||
721 | If unsure, say N. | ||
722 | |||
723 | config DEBUG_INFO_REDUCED | ||
724 | bool "Reduce debugging information" | ||
725 | depends on DEBUG_INFO | ||
726 | help | ||
727 | If you say Y here gcc is instructed to generate less debugging | ||
728 | information for structure types. This means that tools that | ||
729 | need full debugging information (like kgdb or systemtap) won't | ||
730 | be happy. But if you merely need debugging information to | ||
731 | resolve line numbers there is no loss. Advantage is that | ||
732 | build directory object sizes shrink dramatically over a full | ||
733 | DEBUG_INFO build and compile times are reduced too. | ||
734 | Only works with newer gcc versions. | ||
735 | |||
736 | config DEBUG_VM | ||
737 | bool "Debug VM" | ||
738 | depends on DEBUG_KERNEL | ||
739 | help | ||
740 | Enable this to turn on extended checks in the virtual-memory system | ||
741 | that may impact performance. | ||
742 | |||
743 | If unsure, say N. | ||
744 | |||
745 | config DEBUG_VM_RB | ||
746 | bool "Debug VM red-black trees" | ||
747 | depends on DEBUG_VM | ||
748 | help | ||
749 | Enable this to turn on more extended checks in the virtual-memory | ||
750 | system that may impact performance. | ||
751 | |||
752 | If unsure, say N. | ||
753 | |||
754 | config DEBUG_VIRTUAL | ||
755 | bool "Debug VM translations" | ||
756 | depends on DEBUG_KERNEL && X86 | ||
757 | help | ||
758 | Enable some costly sanity checks in virtual to page code. This can | ||
759 | catch mistakes with virt_to_page() and friends. | ||
760 | |||
761 | If unsure, say N. | ||
762 | |||
763 | config DEBUG_NOMMU_REGIONS | ||
764 | bool "Debug the global anon/private NOMMU mapping region tree" | ||
765 | depends on DEBUG_KERNEL && !MMU | ||
766 | help | ||
767 | This option causes the global tree of anonymous and private mapping | ||
768 | regions to be regularly checked for invalid topology. | ||
769 | |||
770 | config DEBUG_WRITECOUNT | 996 | config DEBUG_WRITECOUNT |
771 | bool "Debug filesystem writers count" | 997 | bool "Debug filesystem writers count" |
772 | depends on DEBUG_KERNEL | 998 | depends on DEBUG_KERNEL |
@@ -777,18 +1003,6 @@ config DEBUG_WRITECOUNT | |||
777 | 1003 | ||
778 | If unsure, say N. | 1004 | If unsure, say N. |
779 | 1005 | ||
780 | config DEBUG_MEMORY_INIT | ||
781 | bool "Debug memory initialisation" if EXPERT | ||
782 | default !EXPERT | ||
783 | help | ||
784 | Enable this for additional checks during memory initialisation. | ||
785 | The sanity checks verify aspects of the VM such as the memory model | ||
786 | and other information provided by the architecture. Verbose | ||
787 | information will be printed at KERN_DEBUG loglevel depending | ||
788 | on the mminit_loglevel= command-line option. | ||
789 | |||
790 | If unsure, say Y | ||
791 | |||
792 | config DEBUG_LIST | 1006 | config DEBUG_LIST |
793 | bool "Debug linked list manipulation" | 1007 | bool "Debug linked list manipulation" |
794 | depends on DEBUG_KERNEL | 1008 | depends on DEBUG_KERNEL |
@@ -798,15 +1012,6 @@ config DEBUG_LIST | |||
798 | 1012 | ||
799 | If unsure, say N. | 1013 | If unsure, say N. |
800 | 1014 | ||
801 | config TEST_LIST_SORT | ||
802 | bool "Linked list sorting test" | ||
803 | depends on DEBUG_KERNEL | ||
804 | help | ||
805 | Enable this to turn on 'list_sort()' function test. This test is | ||
806 | executed only once during system boot, so affects only boot time. | ||
807 | |||
808 | If unsure, say N. | ||
809 | |||
810 | config DEBUG_SG | 1015 | config DEBUG_SG |
811 | bool "Debug SG table operations" | 1016 | bool "Debug SG table operations" |
812 | depends on DEBUG_KERNEL | 1017 | depends on DEBUG_KERNEL |
@@ -842,45 +1047,6 @@ config DEBUG_CREDENTIALS | |||
842 | 1047 | ||
843 | If unsure, say N. | 1048 | If unsure, say N. |
844 | 1049 | ||
845 | # | ||
846 | # Select this config option from the architecture Kconfig, if it | ||
847 | # is preferred to always offer frame pointers as a config | ||
848 | # option on the architecture (regardless of KERNEL_DEBUG): | ||
849 | # | ||
850 | config ARCH_WANT_FRAME_POINTERS | ||
851 | bool | ||
852 | help | ||
853 | |||
854 | config FRAME_POINTER | ||
855 | bool "Compile the kernel with frame pointers" | ||
856 | depends on DEBUG_KERNEL && \ | ||
857 | (CRIS || M68K || FRV || UML || \ | ||
858 | AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \ | ||
859 | ARCH_WANT_FRAME_POINTERS | ||
860 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | ||
861 | help | ||
862 | If you say Y here the resulting kernel image will be slightly | ||
863 | larger and slower, but it gives very useful debugging information | ||
864 | in case of kernel bugs. (precise oopses/stacktraces/warnings) | ||
865 | |||
866 | config BOOT_PRINTK_DELAY | ||
867 | bool "Delay each boot printk message by N milliseconds" | ||
868 | depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY | ||
869 | help | ||
870 | This build option allows you to read kernel boot messages | ||
871 | by inserting a short delay after each one. The delay is | ||
872 | specified in milliseconds on the kernel command line, | ||
873 | using "boot_delay=N". | ||
874 | |||
875 | It is likely that you would also need to use "lpj=M" to preset | ||
876 | the "loops per jiffie" value. | ||
877 | See a previous boot log for the "lpj" value to use for your | ||
878 | system, and then set "lpj=M" before setting "boot_delay=N". | ||
879 | NOTE: Using this option may adversely affect SMP systems. | ||
880 | I.e., processors other than the first one may not boot up. | ||
881 | BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect | ||
882 | what it believes to be lockup conditions. | ||
883 | |||
884 | menu "RCU Debugging" | 1050 | menu "RCU Debugging" |
885 | 1051 | ||
886 | config PROVE_RCU | 1052 | config PROVE_RCU |
@@ -1019,33 +1185,6 @@ config RCU_TRACE | |||
1019 | 1185 | ||
1020 | endmenu # "RCU Debugging" | 1186 | endmenu # "RCU Debugging" |
1021 | 1187 | ||
1022 | config KPROBES_SANITY_TEST | ||
1023 | bool "Kprobes sanity tests" | ||
1024 | depends on DEBUG_KERNEL | ||
1025 | depends on KPROBES | ||
1026 | default n | ||
1027 | help | ||
1028 | This option provides for testing basic kprobes functionality on | ||
1029 | boot. A sample kprobe, jprobe and kretprobe are inserted and | ||
1030 | verified for functionality. | ||
1031 | |||
1032 | Say N if you are unsure. | ||
1033 | |||
1034 | config BACKTRACE_SELF_TEST | ||
1035 | tristate "Self test for the backtrace code" | ||
1036 | depends on DEBUG_KERNEL | ||
1037 | default n | ||
1038 | help | ||
1039 | This option provides a kernel module that can be used to test | ||
1040 | the kernel stack backtrace code. This option is not useful | ||
1041 | for distributions or general kernels, but only for kernel | ||
1042 | developers working on architecture code. | ||
1043 | |||
1044 | Note that if you want to also test saved backtraces, you will | ||
1045 | have to enable STACKTRACE as well. | ||
1046 | |||
1047 | Say N if you are unsure. | ||
1048 | |||
1049 | config DEBUG_BLOCK_EXT_DEVT | 1188 | config DEBUG_BLOCK_EXT_DEVT |
1050 | bool "Force extended block device numbers and spread them" | 1189 | bool "Force extended block device numbers and spread them" |
1051 | depends on DEBUG_KERNEL | 1190 | depends on DEBUG_KERNEL |
@@ -1073,47 +1212,6 @@ config DEBUG_BLOCK_EXT_DEVT | |||
1073 | 1212 | ||
1074 | Say N if you are unsure. | 1213 | Say N if you are unsure. |
1075 | 1214 | ||
1076 | config DEBUG_FORCE_WEAK_PER_CPU | ||
1077 | bool "Force weak per-cpu definitions" | ||
1078 | depends on DEBUG_KERNEL | ||
1079 | help | ||
1080 | s390 and alpha require percpu variables in modules to be | ||
1081 | defined weak to work around addressing range issue which | ||
1082 | puts the following two restrictions on percpu variable | ||
1083 | definitions. | ||
1084 | |||
1085 | 1. percpu symbols must be unique whether static or not | ||
1086 | 2. percpu variables can't be defined inside a function | ||
1087 | |||
1088 | To ensure that generic code follows the above rules, this | ||
1089 | option forces all percpu variables to be defined as weak. | ||
1090 | |||
1091 | config DEBUG_PER_CPU_MAPS | ||
1092 | bool "Debug access to per_cpu maps" | ||
1093 | depends on DEBUG_KERNEL | ||
1094 | depends on SMP | ||
1095 | help | ||
1096 | Say Y to verify that the per_cpu map being accessed has | ||
1097 | been set up. This adds a fair amount of code to kernel memory | ||
1098 | and decreases performance. | ||
1099 | |||
1100 | Say N if unsure. | ||
1101 | |||
1102 | config LKDTM | ||
1103 | tristate "Linux Kernel Dump Test Tool Module" | ||
1104 | depends on DEBUG_FS | ||
1105 | depends on BLOCK | ||
1106 | default n | ||
1107 | help | ||
1108 | This module enables testing of the different dumping mechanisms by | ||
1109 | inducing system failures at predefined crash points. | ||
1110 | If you don't need it: say N | ||
1111 | Choose M here to compile this code as a module. The module will be | ||
1112 | called lkdtm. | ||
1113 | |||
1114 | Documentation on how to use the module can be found in | ||
1115 | Documentation/fault-injection/provoke-crashes.txt | ||
1116 | |||
1117 | config NOTIFIER_ERROR_INJECTION | 1215 | config NOTIFIER_ERROR_INJECTION |
1118 | tristate "Notifier error injection" | 1216 | tristate "Notifier error injection" |
1119 | depends on DEBUG_KERNEL | 1217 | depends on DEBUG_KERNEL |
@@ -1173,29 +1271,6 @@ config PM_NOTIFIER_ERROR_INJECT | |||
1173 | 1271 | ||
1174 | If unsure, say N. | 1272 | If unsure, say N. |
1175 | 1273 | ||
1176 | config MEMORY_NOTIFIER_ERROR_INJECT | ||
1177 | tristate "Memory hotplug notifier error injection module" | ||
1178 | depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION | ||
1179 | help | ||
1180 | This option provides the ability to inject artificial errors to | ||
1181 | memory hotplug notifier chain callbacks. It is controlled through | ||
1182 | debugfs interface under /sys/kernel/debug/notifier-error-inject/memory | ||
1183 | |||
1184 | If the notifier call chain should be failed with some events | ||
1185 | notified, write the error code to "actions/<notifier event>/error". | ||
1186 | |||
1187 | Example: Inject memory hotplug offline error (-12 == -ENOMEM) | ||
1188 | |||
1189 | # cd /sys/kernel/debug/notifier-error-inject/memory | ||
1190 | # echo -12 > actions/MEM_GOING_OFFLINE/error | ||
1191 | # echo offline > /sys/devices/system/memory/memoryXXX/state | ||
1192 | bash: echo: write error: Cannot allocate memory | ||
1193 | |||
1194 | To compile this code as a module, choose M here: the module will | ||
1195 | be called memory-notifier-error-inject. | ||
1196 | |||
1197 | If unsure, say N. | ||
1198 | |||
1199 | config OF_RECONFIG_NOTIFIER_ERROR_INJECT | 1274 | config OF_RECONFIG_NOTIFIER_ERROR_INJECT |
1200 | tristate "OF reconfig notifier error injection module" | 1275 | tristate "OF reconfig notifier error injection module" |
1201 | depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION | 1276 | depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION |
@@ -1272,7 +1347,7 @@ config FAULT_INJECTION_STACKTRACE_FILTER | |||
1272 | depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT | 1347 | depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT |
1273 | depends on !X86_64 | 1348 | depends on !X86_64 |
1274 | select STACKTRACE | 1349 | select STACKTRACE |
1275 | select FRAME_POINTER if !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND | 1350 | select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND |
1276 | help | 1351 | help |
1277 | Provide stacktrace filter for fault-injection capabilities | 1352 | Provide stacktrace filter for fault-injection capabilities |
1278 | 1353 | ||
@@ -1310,9 +1385,61 @@ config DEBUG_STRICT_USER_COPY_CHECKS | |||
1310 | 1385 | ||
1311 | If unsure, say N. | 1386 | If unsure, say N. |
1312 | 1387 | ||
1313 | source mm/Kconfig.debug | ||
1314 | source kernel/trace/Kconfig | 1388 | source kernel/trace/Kconfig |
1315 | 1389 | ||
1390 | menu "Runtime Testing" | ||
1391 | |||
1392 | config LKDTM | ||
1393 | tristate "Linux Kernel Dump Test Tool Module" | ||
1394 | depends on DEBUG_FS | ||
1395 | depends on BLOCK | ||
1396 | default n | ||
1397 | help | ||
1398 | This module enables testing of the different dumping mechanisms by | ||
1399 | inducing system failures at predefined crash points. | ||
1400 | If you don't need it: say N | ||
1401 | Choose M here to compile this code as a module. The module will be | ||
1402 | called lkdtm. | ||
1403 | |||
1404 | Documentation on how to use the module can be found in | ||
1405 | Documentation/fault-injection/provoke-crashes.txt | ||
1406 | |||
1407 | config TEST_LIST_SORT | ||
1408 | bool "Linked list sorting test" | ||
1409 | depends on DEBUG_KERNEL | ||
1410 | help | ||
1411 | Enable this to turn on 'list_sort()' function test. This test is | ||
1412 | executed only once during system boot, so affects only boot time. | ||
1413 | |||
1414 | If unsure, say N. | ||
1415 | |||
1416 | config KPROBES_SANITY_TEST | ||
1417 | bool "Kprobes sanity tests" | ||
1418 | depends on DEBUG_KERNEL | ||
1419 | depends on KPROBES | ||
1420 | default n | ||
1421 | help | ||
1422 | This option provides for testing basic kprobes functionality on | ||
1423 | boot. A sample kprobe, jprobe and kretprobe are inserted and | ||
1424 | verified for functionality. | ||
1425 | |||
1426 | Say N if you are unsure. | ||
1427 | |||
1428 | config BACKTRACE_SELF_TEST | ||
1429 | tristate "Self test for the backtrace code" | ||
1430 | depends on DEBUG_KERNEL | ||
1431 | default n | ||
1432 | help | ||
1433 | This option provides a kernel module that can be used to test | ||
1434 | the kernel stack backtrace code. This option is not useful | ||
1435 | for distributions or general kernels, but only for kernel | ||
1436 | developers working on architecture code. | ||
1437 | |||
1438 | Note that if you want to also test saved backtraces, you will | ||
1439 | have to enable STACKTRACE as well. | ||
1440 | |||
1441 | Say N if you are unsure. | ||
1442 | |||
1316 | config RBTREE_TEST | 1443 | config RBTREE_TEST |
1317 | tristate "Red-Black tree test" | 1444 | tristate "Red-Black tree test" |
1318 | depends on m && DEBUG_KERNEL | 1445 | depends on m && DEBUG_KERNEL |
@@ -1326,6 +1453,34 @@ config INTERVAL_TREE_TEST | |||
1326 | help | 1453 | help |
1327 | A benchmark measuring the performance of the interval tree library | 1454 | A benchmark measuring the performance of the interval tree library |
1328 | 1455 | ||
1456 | config ATOMIC64_SELFTEST | ||
1457 | bool "Perform an atomic64_t self-test at boot" | ||
1458 | help | ||
1459 | Enable this option to test the atomic64_t functions at boot. | ||
1460 | |||
1461 | If unsure, say N. | ||
1462 | |||
1463 | config ASYNC_RAID6_TEST | ||
1464 | tristate "Self test for hardware accelerated raid6 recovery" | ||
1465 | depends on ASYNC_RAID6_RECOV | ||
1466 | select ASYNC_MEMCPY | ||
1467 | ---help--- | ||
1468 | This is a one-shot self test that permutes through the | ||
1469 | recovery of all the possible two disk failure scenarios for a | ||
1470 | N-disk array. Recovery is performed with the asynchronous | ||
1471 | raid6 recovery routines, and will optionally use an offload | ||
1472 | engine if one is available. | ||
1473 | |||
1474 | If unsure, say N. | ||
1475 | |||
1476 | config TEST_STRING_HELPERS | ||
1477 | tristate "Test functions located in the string_helpers module at runtime" | ||
1478 | |||
1479 | config TEST_KSTRTOX | ||
1480 | tristate "Test kstrto*() family of functions at runtime" | ||
1481 | |||
1482 | endmenu # runtime tests | ||
1483 | |||
1329 | config PROVIDE_OHCI1394_DMA_INIT | 1484 | config PROVIDE_OHCI1394_DMA_INIT |
1330 | bool "Remote debugging over FireWire early on boot" | 1485 | bool "Remote debugging over FireWire early on boot" |
1331 | depends on PCI && X86 | 1486 | depends on PCI && X86 |
@@ -1375,75 +1530,6 @@ config BUILD_DOCSRC | |||
1375 | 1530 | ||
1376 | Say N if you are unsure. | 1531 | Say N if you are unsure. |
1377 | 1532 | ||
1378 | config DYNAMIC_DEBUG | ||
1379 | bool "Enable dynamic printk() support" | ||
1380 | default n | ||
1381 | depends on PRINTK | ||
1382 | depends on DEBUG_FS | ||
1383 | help | ||
1384 | |||
1385 | Compiles debug level messages into the kernel, which would not | ||
1386 | otherwise be available at runtime. These messages can then be | ||
1387 | enabled/disabled based on various levels of scope - per source file, | ||
1388 | function, module, format string, and line number. This mechanism | ||
1389 | implicitly compiles in all pr_debug() and dev_dbg() calls, which | ||
1390 | enlarges the kernel text size by about 2%. | ||
1391 | |||
1392 | If a source file is compiled with DEBUG flag set, any | ||
1393 | pr_debug() calls in it are enabled by default, but can be | ||
1394 | disabled at runtime as below. Note that DEBUG flag is | ||
1395 | turned on by many CONFIG_*DEBUG* options. | ||
1396 | |||
1397 | Usage: | ||
1398 | |||
1399 | Dynamic debugging is controlled via the 'dynamic_debug/control' file, | ||
1400 | which is contained in the 'debugfs' filesystem. Thus, the debugfs | ||
1401 | filesystem must first be mounted before making use of this feature. | ||
1402 | We refer the control file as: <debugfs>/dynamic_debug/control. This | ||
1403 | file contains a list of the debug statements that can be enabled. The | ||
1404 | format for each line of the file is: | ||
1405 | |||
1406 | filename:lineno [module]function flags format | ||
1407 | |||
1408 | filename : source file of the debug statement | ||
1409 | lineno : line number of the debug statement | ||
1410 | module : module that contains the debug statement | ||
1411 | function : function that contains the debug statement | ||
1412 | flags : '=p' means the line is turned 'on' for printing | ||
1413 | format : the format used for the debug statement | ||
1414 | |||
1415 | From a live system: | ||
1416 | |||
1417 | nullarbor:~ # cat <debugfs>/dynamic_debug/control | ||
1418 | # filename:lineno [module]function flags format | ||
1419 | fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012" | ||
1420 | fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012" | ||
1421 | fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012" | ||
1422 | |||
1423 | Example usage: | ||
1424 | |||
1425 | // enable the message at line 1603 of file svcsock.c | ||
1426 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > | ||
1427 | <debugfs>/dynamic_debug/control | ||
1428 | |||
1429 | // enable all the messages in file svcsock.c | ||
1430 | nullarbor:~ # echo -n 'file svcsock.c +p' > | ||
1431 | <debugfs>/dynamic_debug/control | ||
1432 | |||
1433 | // enable all the messages in the NFS server module | ||
1434 | nullarbor:~ # echo -n 'module nfsd +p' > | ||
1435 | <debugfs>/dynamic_debug/control | ||
1436 | |||
1437 | // enable all 12 messages in the function svc_process() | ||
1438 | nullarbor:~ # echo -n 'func svc_process +p' > | ||
1439 | <debugfs>/dynamic_debug/control | ||
1440 | |||
1441 | // disable all 12 messages in the function svc_process() | ||
1442 | nullarbor:~ # echo -n 'func svc_process -p' > | ||
1443 | <debugfs>/dynamic_debug/control | ||
1444 | |||
1445 | See Documentation/dynamic-debug-howto.txt for additional information. | ||
1446 | |||
1447 | config DMA_API_DEBUG | 1533 | config DMA_API_DEBUG |
1448 | bool "Enable debugging of DMA-API usage" | 1534 | bool "Enable debugging of DMA-API usage" |
1449 | depends on HAVE_DMA_API_DEBUG | 1535 | depends on HAVE_DMA_API_DEBUG |
@@ -1455,34 +1541,7 @@ config DMA_API_DEBUG | |||
1455 | This option causes a performance degredation. Use only if you want | 1541 | This option causes a performance degredation. Use only if you want |
1456 | to debug device drivers. If unsure, say N. | 1542 | to debug device drivers. If unsure, say N. |
1457 | 1543 | ||
1458 | config ATOMIC64_SELFTEST | ||
1459 | bool "Perform an atomic64_t self-test at boot" | ||
1460 | help | ||
1461 | Enable this option to test the atomic64_t functions at boot. | ||
1462 | |||
1463 | If unsure, say N. | ||
1464 | |||
1465 | config ASYNC_RAID6_TEST | ||
1466 | tristate "Self test for hardware accelerated raid6 recovery" | ||
1467 | depends on ASYNC_RAID6_RECOV | ||
1468 | select ASYNC_MEMCPY | ||
1469 | ---help--- | ||
1470 | This is a one-shot self test that permutes through the | ||
1471 | recovery of all the possible two disk failure scenarios for a | ||
1472 | N-disk array. Recovery is performed with the asynchronous | ||
1473 | raid6 recovery routines, and will optionally use an offload | ||
1474 | engine if one is available. | ||
1475 | |||
1476 | If unsure, say N. | ||
1477 | |||
1478 | source "samples/Kconfig" | 1544 | source "samples/Kconfig" |
1479 | 1545 | ||
1480 | source "lib/Kconfig.kgdb" | 1546 | source "lib/Kconfig.kgdb" |
1481 | 1547 | ||
1482 | source "lib/Kconfig.kmemcheck" | ||
1483 | |||
1484 | config TEST_STRING_HELPERS | ||
1485 | tristate "Test functions located in the string_helpers module at runtime" | ||
1486 | |||
1487 | config TEST_KSTRTOX | ||
1488 | tristate "Test kstrto*() family of functions at runtime" | ||