diff options
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r-- | lib/Kconfig.debug | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 3be4b7caf5b8..23067ab1a73c 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -300,7 +300,7 @@ config DEBUG_OBJECTS_ENABLE_DEFAULT | |||
300 | 300 | ||
301 | config DEBUG_SLAB | 301 | config 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 | ||
313 | config SLUB_DEBUG_ON | 313 | config 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,38 @@ 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 | ||
339 | config DEBUG_KMEMLEAK | ||
340 | bool "Kernel memory leak detector" | ||
341 | depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM) && \ | ||
342 | !MEMORY_HOTPLUG | ||
343 | select DEBUG_SLAB if SLAB | ||
344 | select SLUB_DEBUG if SLUB | ||
345 | select DEBUG_FS if SYSFS | ||
346 | select STACKTRACE if STACKTRACE_SUPPORT | ||
347 | select KALLSYMS | ||
348 | help | ||
349 | Say Y here if you want to enable the memory leak | ||
350 | detector. The memory allocation/freeing is traced in a way | ||
351 | similar to the Boehm's conservative garbage collector, the | ||
352 | difference being that the orphan objects are not freed but | ||
353 | only shown in /sys/kernel/debug/kmemleak. Enabling this | ||
354 | feature will introduce an overhead to memory | ||
355 | allocations. See Documentation/kmemleak.txt for more | ||
356 | details. | ||
357 | |||
358 | In order to access the kmemleak file, debugfs needs to be | ||
359 | mounted (usually at /sys/kernel/debug). | ||
360 | |||
361 | config DEBUG_KMEMLEAK_TEST | ||
362 | tristate "Simple test for the kernel memory leak detector" | ||
363 | depends on DEBUG_KMEMLEAK | ||
364 | help | ||
365 | Say Y or M here to build a test for the kernel memory leak | ||
366 | detector. This option enables a module that explicitly leaks | ||
367 | memory. | ||
368 | |||
369 | If unsure, say N. | ||
370 | |||
339 | config DEBUG_PREEMPT | 371 | config DEBUG_PREEMPT |
340 | bool "Debug preemptible kernel" | 372 | bool "Debug preemptible kernel" |
341 | depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64) | 373 | depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64) |
@@ -964,3 +996,5 @@ config DMA_API_DEBUG | |||
964 | source "samples/Kconfig" | 996 | source "samples/Kconfig" |
965 | 997 | ||
966 | source "lib/Kconfig.kgdb" | 998 | source "lib/Kconfig.kgdb" |
999 | |||
1000 | source "lib/Kconfig.kmemcheck" | ||