lkml.org 
[lkml]   [2008]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 12/15] kmemleak: Enable the building of the memory leak detector
    From
    Date
    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>
    Cc: Ingo Molnar <mingo@elte.hu>
    ---
    lib/Kconfig.debug | 23 +++++++++++++++++++++++
    mm/Makefile | 1 +
    2 files changed, 24 insertions(+), 0 deletions(-)

    diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
    index b0f239e..1e59827 100644
    --- a/lib/Kconfig.debug
    +++ b/lib/Kconfig.debug
    @@ -290,6 +290,29 @@ config SLUB_STATS
    out which slabs are relevant to a particular load.
    Try running: slabinfo -DA

    +config DEBUG_MEMLEAK
    + bool "Kernel memory leak detector"
    + default n
    + depends on EXPERIMENTAL
    + select DEBUG_SLAB if SLAB
    + select SLUB_DEBUG if SLUB
    + select DEBUG_FS
    + select STACKTRACE
    + select FRAME_POINTER
    + 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/memleak. Enabling this
    + feature will introduce an overhead to memory
    + allocations. See Documentation/kmemleak.txt for more
    + details.
    +
    + In order to access the memleak file, debugfs needs to be
    + mounted (usually at /sys/kernel/debug).
    +
    config DEBUG_PREEMPT
    bool "Debug preemptible kernel"
    depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64)
    diff --git a/mm/Makefile b/mm/Makefile
    index c06b45a..3e43536 100644
    --- a/mm/Makefile
    +++ b/mm/Makefile
    @@ -34,3 +34,4 @@ obj-$(CONFIG_MIGRATION) += migrate.o
    obj-$(CONFIG_SMP) += allocpercpu.o
    obj-$(CONFIG_QUICKLIST) += quicklist.o
    obj-$(CONFIG_CGROUP_MEM_RES_CTLR) += memcontrol.o page_cgroup.o
    +obj-$(CONFIG_DEBUG_MEMLEAK) += memleak.o


    \
     
     \ /
      Last update: 2008-11-29 11:51    [W:0.027 / U:87.932 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site