aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug41
1 files changed, 38 insertions, 3 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6cdcf38f2da9..4c32b1a1a06e 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -300,7 +300,7 @@ config DEBUG_OBJECTS_ENABLE_DEFAULT
300 300
301config DEBUG_SLAB 301config DEBUG_SLAB
302 bool "Debug slab memory allocations" 302 bool "Debug slab memory allocations"
303 depends on DEBUG_KERNEL && SLAB 303 depends on DEBUG_KERNEL && SLAB && !KMEMCHECK
304 help 304 help
305 Say Y here to have the kernel do limited verification on memory 305 Say Y here to have the kernel do limited verification on memory
306 allocation as well as poisoning memory on free to catch use of freed 306 allocation as well as poisoning memory on free to catch use of freed
@@ -312,7 +312,7 @@ config DEBUG_SLAB_LEAK
312 312
313config SLUB_DEBUG_ON 313config SLUB_DEBUG_ON
314 bool "SLUB debugging on by default" 314 bool "SLUB debugging on by default"
315 depends on SLUB && SLUB_DEBUG 315 depends on SLUB && SLUB_DEBUG && !KMEMCHECK
316 default n 316 default n
317 help 317 help
318 Boot with debugging on by default. SLUB boots by default with 318 Boot with debugging on by default. SLUB boots by default with
@@ -336,6 +336,39 @@ config SLUB_STATS
336 out which slabs are relevant to a particular load. 336 out which slabs are relevant to a particular load.
337 Try running: slabinfo -DA 337 Try running: slabinfo -DA
338 338
339config DEBUG_KMEMLEAK
340 bool "Kernel memory leak detector"
341 depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM) && \
342 !MEMORY_HOTPLUG
343 select DEBUG_FS if SYSFS
344 select STACKTRACE if STACKTRACE_SUPPORT
345 select KALLSYMS
346 help
347 Say Y here if you want to enable the memory leak
348 detector. The memory allocation/freeing is traced in a way
349 similar to the Boehm's conservative garbage collector, the
350 difference being that the orphan objects are not freed but
351 only shown in /sys/kernel/debug/kmemleak. Enabling this
352 feature will introduce an overhead to memory
353 allocations. See Documentation/kmemleak.txt for more
354 details.
355
356 Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
357 of finding leaks due to the slab objects poisoning.
358
359 In order to access the kmemleak file, debugfs needs to be
360 mounted (usually at /sys/kernel/debug).
361
362config DEBUG_KMEMLEAK_TEST
363 tristate "Simple test for the kernel memory leak detector"
364 depends on DEBUG_KMEMLEAK
365 help
366 Say Y or M here to build a test for the kernel memory leak
367 detector. This option enables a module that explicitly leaks
368 memory.
369
370 If unsure, say N.
371
339config DEBUG_PREEMPT 372config DEBUG_PREEMPT
340 bool "Debug preemptible kernel" 373 bool "Debug preemptible kernel"
341 depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64) 374 depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64)
@@ -440,7 +473,7 @@ config LOCKDEP
440 bool 473 bool
441 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT 474 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
442 select STACKTRACE 475 select STACKTRACE
443 select FRAME_POINTER if !X86 && !MIPS && !PPC && !ARM_UNWIND && !S390 476 select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390
444 select KALLSYMS 477 select KALLSYMS
445 select KALLSYMS_ALL 478 select KALLSYMS_ALL
446 479
@@ -964,3 +997,5 @@ config DMA_API_DEBUG
964source "samples/Kconfig" 997source "samples/Kconfig"
965 998
966source "lib/Kconfig.kgdb" 999source "lib/Kconfig.kgdb"
1000
1001source "lib/Kconfig.kmemcheck"