diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-03-16 19:38:19 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-03-16 19:38:19 +1100 |
commit | 6ded02c4b8d66c648565cd82da553883f3a33dcf (patch) | |
tree | 34bca4d86fcbe736b7ae873bab36910f9e2ce19d /lib | |
parent | e054e45b053e20f1d4ec4a5f48e6b1fbc9484cec (diff) | |
parent | e601725c07e6a4855cea78d1f65219ba6be63a06 (diff) |
Merge commit 'kmemleak/kmemleak'
Conflicts:
Documentation/kernel-parameters.txt
MAINTAINERS
include/linux/percpu.h
include/linux/slab.h
init/main.c
kernel/module.c
lib/Kconfig.debug
mm/slab.c
mm/slob.c
mm/slub.c
mm/vmalloc.c
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index d8828a758932..c205937eb7f3 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -356,6 +356,39 @@ config SLQB_STATS default n depends on SLQB_SYSFS +config DEBUG_KMEMLEAK + bool "Kernel memory leak detector" + default n + depends on EXPERIMENTAL && (X86 || ARM) && !MEMORY_HOTPLUG + select DEBUG_SLAB if SLAB + select SLUB_DEBUG if SLUB + select DEBUG_FS if SYSFS + select STACKTRACE if STACKTRACE_SUPPORT + select KALLSYMS + help + Say Y here if you want to enable the memory leak + detector. The memory allocation/freeing is traced in a way + similar to the Boehm's conservative garbage collector, the + difference being that the orphan objects are not freed but + only shown in /sys/kernel/debug/kmemleak. Enabling this + feature will introduce an overhead to memory + allocations. See Documentation/kmemleak.txt for more + details. + + In order to access the kmemleak file, debugfs needs to be + mounted (usually at /sys/kernel/debug). + +config DEBUG_KMEMLEAK_TEST + tristate "Simple test for the kernel memory leak detector" + default n + depends on DEBUG_KMEMLEAK + help + Say Y or M here to build a test for the kernel memory leak + detector. This option enables a module that explicitly leaks + memory. + + If unsure, say N. + config DEBUG_PREEMPT bool "Debug preemptible kernel" depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64) |