diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-06-11 08:24:13 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-06-11 12:04:18 -0400 |
commit | 3bba00d7bdd57cb7aa739b751fa0a1fbbb04dc18 (patch) | |
tree | e4a8634757a489f9a5c28d14dcb7d3f7e00fe348 /lib/Kconfig.debug | |
parent | 2e1483c995bbd0fa6cbd055ad76088a520799ba4 (diff) |
kmemleak: Enable the building of the memory leak detector
This patch adds the Kconfig.debug and Makefile entries needed for
building kmemleak into the kernel.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r-- | lib/Kconfig.debug | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6cdcf38f2da9..5cc3506574e9 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -336,6 +336,28 @@ 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 | |||
339 | config DEBUG_PREEMPT | 361 | config DEBUG_PREEMPT |
340 | bool "Debug preemptible kernel" | 362 | bool "Debug preemptible kernel" |
341 | depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64) | 363 | depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64) |