Kernel debug options
Revision as of 14:16, 5 March 2009 by Kir (talk | contribs) (Debugging the kernel moved to SLAB, SLUB, lockdep kernel debug)
This page describes some debugging, that can be turned on in order to find more info about an oops/bug/deadlock/etc
Contents
Memory debugging options
There are two sets of options, depending on what kind of memory allocator you use
SLAB
If you have a
CONFIG_SLAB=y # CONFIG_SLUB is not set
disposition in your config file, then the proper debugging options are
CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_SLAB=y CONFIG_DEBUG_SLAB_LEAK=y
SLUB
If you have a
# CONFIG_SLAB is not set CONFIG_SLUB=y
set of options, then your choice should be
CONFIG_SLUB_DEBUG=y CONFIG_SLUB_DEBUG_ON=y
Locking debugging
The following options are useful when debugging various deadlocks and memory corruptions. They produce some performance loss, however.
CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_DEBUG_SPINLOCK_SLEEP=y CONFIG_DEBUG_LIST=y
There are some others, but the above are minimal set.