xref: /openbmc/linux/lib/Kconfig.debug (revision d6ec084200c37683278c821338f74ddf21ab80f5)
11da177e4SLinus Torvalds
21da177e4SLinus Torvaldsconfig PRINTK_TIME
31da177e4SLinus Torvalds	bool "Show timing information on printks"
4d3b8b6e5SRandy Dunlap	depends on PRINTK
51da177e4SLinus Torvalds	help
61da177e4SLinus Torvalds	  Selecting this option causes timing information to be
71da177e4SLinus Torvalds	  included in printk output.  This allows you to measure
81da177e4SLinus Torvalds	  the interval between kernel operations, including bootup
91da177e4SLinus Torvalds	  operations.  This is useful for identifying long delays
101da177e4SLinus Torvalds	  in kernel startup.
111da177e4SLinus Torvalds
12cebc04baSAndrew Mortonconfig ENABLE_MUST_CHECK
13cebc04baSAndrew Morton	bool "Enable __must_check logic"
14cebc04baSAndrew Morton	default y
15cebc04baSAndrew Morton	help
16cebc04baSAndrew Morton	  Enable the __must_check logic in the kernel build.  Disable this to
17cebc04baSAndrew Morton	  suppress the "warning: ignoring return value of 'foo', declared with
18cebc04baSAndrew Morton	  attribute warn_unused_result" messages.
191da177e4SLinus Torvalds
201da177e4SLinus Torvaldsconfig MAGIC_SYSRQ
211da177e4SLinus Torvalds	bool "Magic SysRq key"
22f346f4b3SAdrian Bunk	depends on !UML
231da177e4SLinus Torvalds	help
241da177e4SLinus Torvalds	  If you say Y here, you will have some control over the system even
251da177e4SLinus Torvalds	  if the system crashes for example during kernel debugging (e.g., you
261da177e4SLinus Torvalds	  will be able to flush the buffer cache to disk, reboot the system
271da177e4SLinus Torvalds	  immediately or dump some status information). This is accomplished
281da177e4SLinus Torvalds	  by pressing various keys while holding SysRq (Alt+PrintScreen). It
291da177e4SLinus Torvalds	  also works on a serial console (on PC hardware at least), if you
301da177e4SLinus Torvalds	  send a BREAK and then within 5 seconds a command keypress. The
311da177e4SLinus Torvalds	  keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
321da177e4SLinus Torvalds	  unless you really know what this hack does.
331da177e4SLinus Torvalds
34f71d20e9SArjan van de Venconfig UNUSED_SYMBOLS
35f71d20e9SArjan van de Ven	bool "Enable unused/obsolete exported symbols"
36f71d20e9SArjan van de Ven	default y if X86
37f71d20e9SArjan van de Ven	help
38f71d20e9SArjan van de Ven	  Unused but exported symbols make the kernel needlessly bigger.  For
39f71d20e9SArjan van de Ven	  that reason most of these unused exports will soon be removed.  This
40f71d20e9SArjan van de Ven	  option is provided temporarily to provide a transition period in case
41f71d20e9SArjan van de Ven	  some external kernel module needs one of these symbols anyway. If you
42f71d20e9SArjan van de Ven	  encounter such a case in your module, consider if you are actually
43f71d20e9SArjan van de Ven	  using the right API.  (rationale: since nobody in the kernel is using
44f71d20e9SArjan van de Ven	  this in a module, there is a pretty good chance it's actually the
45f71d20e9SArjan van de Ven	  wrong interface to use).  If you really need the symbol, please send a
46f71d20e9SArjan van de Ven	  mail to the linux kernel mailing list mentioning the symbol and why
47f71d20e9SArjan van de Ven	  you really need it, and what the merge plan to the mainline kernel for
48f71d20e9SArjan van de Ven	  your module is.
49f71d20e9SArjan van de Ven
50bf4735a4SDon Mullisconfig DEBUG_FS
51bf4735a4SDon Mullis	bool "Debug Filesystem"
52bf4735a4SDon Mullis	depends on SYSFS
53bf4735a4SDon Mullis	help
54bf4735a4SDon Mullis	  debugfs is a virtual file system that kernel developers use to put
55bf4735a4SDon Mullis	  debugging files into.  Enable this option to be able to read and
56bf4735a4SDon Mullis	  write to these files.
57bf4735a4SDon Mullis
58bf4735a4SDon Mullis	  If unsure, say N.
59bf4735a4SDon Mullis
60bf4735a4SDon Mullisconfig HEADERS_CHECK
61bf4735a4SDon Mullis	bool "Run 'make headers_check' when building vmlinux"
62bf4735a4SDon Mullis	depends on !UML
63bf4735a4SDon Mullis	help
64bf4735a4SDon Mullis	  This option will extract the user-visible kernel headers whenever
65bf4735a4SDon Mullis	  building the kernel, and will run basic sanity checks on them to
66bf4735a4SDon Mullis	  ensure that exported files do not attempt to include files which
67bf4735a4SDon Mullis	  were not exported, etc.
68bf4735a4SDon Mullis
69bf4735a4SDon Mullis	  If you're making modifications to header files which are
70bf4735a4SDon Mullis	  relevant for userspace, say 'Y', and check the headers
71bf4735a4SDon Mullis	  exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
72bf4735a4SDon Mullis	  your build tree), to make sure they're suitable.
73bf4735a4SDon Mullis
74f346f4b3SAdrian Bunkconfig DEBUG_KERNEL
75f346f4b3SAdrian Bunk	bool "Kernel debugging"
76f346f4b3SAdrian Bunk	help
77f346f4b3SAdrian Bunk	  Say Y here if you are developing drivers or trying to debug and
78f346f4b3SAdrian Bunk	  identify kernel problems.
79f346f4b3SAdrian Bunk
80a304e1b8SDavid Woodhouseconfig DEBUG_SHIRQ
81a304e1b8SDavid Woodhouse	bool "Debug shared IRQ handlers"
82a304e1b8SDavid Woodhouse	depends on DEBUG_KERNEL && GENERIC_HARDIRQS
83a304e1b8SDavid Woodhouse	help
84a304e1b8SDavid Woodhouse	  Enable this to generate a spurious interrupt as soon as a shared
85a304e1b8SDavid Woodhouse	  interrupt handler is registered, and just before one is deregistered.
86a304e1b8SDavid Woodhouse	  Drivers ought to be able to handle interrupts coming in at those
87a304e1b8SDavid Woodhouse	  points; some don't and need to be caught.
88a304e1b8SDavid Woodhouse
898446f1d3SIngo Molnarconfig DETECT_SOFTLOCKUP
908446f1d3SIngo Molnar	bool "Detect Soft Lockups"
91dea20a3fSHeiko Carstens	depends on DEBUG_KERNEL && !S390
928446f1d3SIngo Molnar	default y
938446f1d3SIngo Molnar	help
948446f1d3SIngo Molnar	  Say Y here to enable the kernel to detect "soft lockups",
958446f1d3SIngo Molnar	  which are bugs that cause the kernel to loop in kernel
968446f1d3SIngo Molnar	  mode for more than 10 seconds, without giving other tasks a
978446f1d3SIngo Molnar	  chance to run.
988446f1d3SIngo Molnar
998446f1d3SIngo Molnar	  When a soft-lockup is detected, the kernel will print the
1008446f1d3SIngo Molnar	  current stack trace (which you should report), but the
1018446f1d3SIngo Molnar	  system will stay locked up. This feature has negligible
1028446f1d3SIngo Molnar	  overhead.
1038446f1d3SIngo Molnar
1048446f1d3SIngo Molnar	  (Note that "hard lockups" are separate type of bugs that
1058446f1d3SIngo Molnar	   can be detected via the NMI-watchdog, on platforms that
1068446f1d3SIngo Molnar	   support it.)
1078446f1d3SIngo Molnar
108b642b6d3SIngo Molnarconfig SCHED_DEBUG
109b642b6d3SIngo Molnar	bool "Collect scheduler debugging info"
110b642b6d3SIngo Molnar	depends on DEBUG_KERNEL && PROC_FS
111b642b6d3SIngo Molnar	default y
112b642b6d3SIngo Molnar	help
113b642b6d3SIngo Molnar	  If you say Y here, the /proc/sched_debug file will be provided
114b642b6d3SIngo Molnar	  that can help debug the scheduler. The runtime overhead of this
115b642b6d3SIngo Molnar	  option is minimal.
116b642b6d3SIngo Molnar
1171da177e4SLinus Torvaldsconfig SCHEDSTATS
1181da177e4SLinus Torvalds	bool "Collect scheduler statistics"
1191da177e4SLinus Torvalds	depends on DEBUG_KERNEL && PROC_FS
1201da177e4SLinus Torvalds	help
1211da177e4SLinus Torvalds	  If you say Y here, additional code will be inserted into the
1221da177e4SLinus Torvalds	  scheduler and related routines to collect statistics about
1231da177e4SLinus Torvalds	  scheduler behavior and provide them in /proc/schedstat.  These
1241da177e4SLinus Torvalds	  stats may be useful for both tuning and debugging the scheduler
1251da177e4SLinus Torvalds	  If you aren't debugging the scheduler or trying to tune a specific
1261da177e4SLinus Torvalds	  application, you can say N to avoid the very slight overhead
1271da177e4SLinus Torvalds	  this adds.
1281da177e4SLinus Torvalds
12982f67cd9SIngo Molnarconfig TIMER_STATS
13082f67cd9SIngo Molnar	bool "Collect kernel timers statistics"
13182f67cd9SIngo Molnar	depends on DEBUG_KERNEL && PROC_FS
13282f67cd9SIngo Molnar	help
13382f67cd9SIngo Molnar	  If you say Y here, additional code will be inserted into the
13482f67cd9SIngo Molnar	  timer routines to collect statistics about kernel timers being
13582f67cd9SIngo Molnar	  reprogrammed. The statistics can be read from /proc/timer_stats.
13682f67cd9SIngo Molnar	  The statistics collection is started by writing 1 to /proc/timer_stats,
13782f67cd9SIngo Molnar	  writing 0 stops it. This feature is useful to collect information
138c1a834dcSIngo Molnar	  about timer usage patterns in kernel and userspace. This feature
139c1a834dcSIngo Molnar	  is lightweight if enabled in the kernel config but not activated
140c1a834dcSIngo Molnar	  (it defaults to deactivated on bootup and will only be activated
141c1a834dcSIngo Molnar	  if some application like powertop activates it explicitly).
14282f67cd9SIngo Molnar
1431da177e4SLinus Torvaldsconfig DEBUG_SLAB
1444a2f0acfSAndrew Morton	bool "Debug slab memory allocations"
14550dd26baSIngo Molnar	depends on DEBUG_KERNEL && SLAB
1461da177e4SLinus Torvalds	help
1471da177e4SLinus Torvalds	  Say Y here to have the kernel do limited verification on memory
1481da177e4SLinus Torvalds	  allocation as well as poisoning memory on free to catch use of freed
1491da177e4SLinus Torvalds	  memory. This can make kmalloc/kfree-intensive workloads much slower.
1501da177e4SLinus Torvalds
151871751e2SAl Viroconfig DEBUG_SLAB_LEAK
152871751e2SAl Viro	bool "Memory leak debugging"
153871751e2SAl Viro	depends on DEBUG_SLAB
154871751e2SAl Viro
155f0630fffSChristoph Lameterconfig SLUB_DEBUG_ON
156f0630fffSChristoph Lameter	bool "SLUB debugging on by default"
157f0630fffSChristoph Lameter	depends on SLUB && SLUB_DEBUG
158f0630fffSChristoph Lameter	default n
159f0630fffSChristoph Lameter	help
160f0630fffSChristoph Lameter	  Boot with debugging on by default. SLUB boots by default with
161f0630fffSChristoph Lameter	  the runtime debug capabilities switched off. Enabling this is
162f0630fffSChristoph Lameter	  equivalent to specifying the "slub_debug" parameter on boot.
163f0630fffSChristoph Lameter	  There is no support for more fine grained debug control like
164f0630fffSChristoph Lameter	  possible with slub_debug=xxx. SLUB debugging may be switched
165f0630fffSChristoph Lameter	  off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
166f0630fffSChristoph Lameter	  "slub_debug=-".
167f0630fffSChristoph Lameter
1681da177e4SLinus Torvaldsconfig DEBUG_PREEMPT
1691da177e4SLinus Torvalds	bool "Debug preemptible kernel"
170048c8bc9SHugh Dickins	depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64)
1711da177e4SLinus Torvalds	default y
1721da177e4SLinus Torvalds	help
1731da177e4SLinus Torvalds	  If you say Y here then the kernel will use a debug variant of the
1741da177e4SLinus Torvalds	  commonly used smp_processor_id() function and will print warnings
1751da177e4SLinus Torvalds	  if kernel code uses it in a preemption-unsafe way. Also, the kernel
1761da177e4SLinus Torvalds	  will detect preemption count underflows.
1771da177e4SLinus Torvalds
178e7eebaf6SIngo Molnarconfig DEBUG_RT_MUTEXES
179e7eebaf6SIngo Molnar	bool "RT Mutex debugging, deadlock detection"
180e7eebaf6SIngo Molnar	depends on DEBUG_KERNEL && RT_MUTEXES
181e7eebaf6SIngo Molnar	help
182e7eebaf6SIngo Molnar	 This allows rt mutex semantics violations and rt mutex related
183e7eebaf6SIngo Molnar	 deadlocks (lockups) to be detected and reported automatically.
184e7eebaf6SIngo Molnar
185e7eebaf6SIngo Molnarconfig DEBUG_PI_LIST
186e7eebaf6SIngo Molnar	bool
187e7eebaf6SIngo Molnar	default y
188e7eebaf6SIngo Molnar	depends on DEBUG_RT_MUTEXES
189e7eebaf6SIngo Molnar
19061a87122SThomas Gleixnerconfig RT_MUTEX_TESTER
19161a87122SThomas Gleixner	bool "Built-in scriptable tester for rt-mutexes"
192a1583d3eSRoman Zippel	depends on DEBUG_KERNEL && RT_MUTEXES
19361a87122SThomas Gleixner	help
19461a87122SThomas Gleixner	  This option enables a rt-mutex tester.
19561a87122SThomas Gleixner
1961da177e4SLinus Torvaldsconfig DEBUG_SPINLOCK
1974d9f34adSIngo Molnar	bool "Spinlock and rw-lock debugging: basic checks"
1981da177e4SLinus Torvalds	depends on DEBUG_KERNEL
1991da177e4SLinus Torvalds	help
2001da177e4SLinus Torvalds	  Say Y here and build SMP to catch missing spinlock initialization
2011da177e4SLinus Torvalds	  and certain other kinds of spinlock errors commonly made.  This is
2021da177e4SLinus Torvalds	  best used in conjunction with the NMI watchdog so that spinlock
2031da177e4SLinus Torvalds	  deadlocks are also debuggable.
2041da177e4SLinus Torvalds
2054d9f34adSIngo Molnarconfig DEBUG_MUTEXES
2064d9f34adSIngo Molnar	bool "Mutex debugging: basic checks"
2074d9f34adSIngo Molnar	depends on DEBUG_KERNEL
2084d9f34adSIngo Molnar	help
2094d9f34adSIngo Molnar	 This feature allows mutex semantics violations to be detected and
2104d9f34adSIngo Molnar	 reported.
2114d9f34adSIngo Molnar
212c761c841SRobert P. J. Dayconfig DEBUG_SEMAPHORE
213c761c841SRobert P. J. Day	bool "Semaphore debugging"
214c761c841SRobert P. J. Day	depends on DEBUG_KERNEL
215c761c841SRobert P. J. Day	depends on ALPHA || FRV
216c761c841SRobert P. J. Day	default n
217c761c841SRobert P. J. Day	help
218c761c841SRobert P. J. Day	  If you say Y here then semaphore processing will issue lots of
219c761c841SRobert P. J. Day	  verbose debugging messages.  If you suspect a semaphore problem or a
220c761c841SRobert P. J. Day	  kernel hacker asks for this option then say Y.  Otherwise say N.
221c761c841SRobert P. J. Day
2224d9f34adSIngo Molnarconfig DEBUG_LOCK_ALLOC
2234d9f34adSIngo Molnar	bool "Lock debugging: detect incorrect freeing of live locks"
224517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
2254d9f34adSIngo Molnar	select DEBUG_SPINLOCK
2264d9f34adSIngo Molnar	select DEBUG_MUTEXES
2274d9f34adSIngo Molnar	select LOCKDEP
2284d9f34adSIngo Molnar	help
2294d9f34adSIngo Molnar	 This feature will check whether any held lock (spinlock, rwlock,
2304d9f34adSIngo Molnar	 mutex or rwsem) is incorrectly freed by the kernel, via any of the
2314d9f34adSIngo Molnar	 memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
2324d9f34adSIngo Molnar	 vfree(), etc.), whether a live lock is incorrectly reinitialized via
2334d9f34adSIngo Molnar	 spin_lock_init()/mutex_init()/etc., or whether there is any lock
2344d9f34adSIngo Molnar	 held during task exit.
2354d9f34adSIngo Molnar
2364d9f34adSIngo Molnarconfig PROVE_LOCKING
2374d9f34adSIngo Molnar	bool "Lock debugging: prove locking correctness"
238517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
2394d9f34adSIngo Molnar	select LOCKDEP
2404d9f34adSIngo Molnar	select DEBUG_SPINLOCK
2414d9f34adSIngo Molnar	select DEBUG_MUTEXES
2424d9f34adSIngo Molnar	select DEBUG_LOCK_ALLOC
2434d9f34adSIngo Molnar	default n
2444d9f34adSIngo Molnar	help
2454d9f34adSIngo Molnar	 This feature enables the kernel to prove that all locking
2464d9f34adSIngo Molnar	 that occurs in the kernel runtime is mathematically
2474d9f34adSIngo Molnar	 correct: that under no circumstance could an arbitrary (and
2484d9f34adSIngo Molnar	 not yet triggered) combination of observed locking
2494d9f34adSIngo Molnar	 sequences (on an arbitrary number of CPUs, running an
2504d9f34adSIngo Molnar	 arbitrary number of tasks and interrupt contexts) cause a
2514d9f34adSIngo Molnar	 deadlock.
2524d9f34adSIngo Molnar
2534d9f34adSIngo Molnar	 In short, this feature enables the kernel to report locking
2544d9f34adSIngo Molnar	 related deadlocks before they actually occur.
2554d9f34adSIngo Molnar
2564d9f34adSIngo Molnar	 The proof does not depend on how hard and complex a
2574d9f34adSIngo Molnar	 deadlock scenario would be to trigger: how many
2584d9f34adSIngo Molnar	 participant CPUs, tasks and irq-contexts would be needed
2594d9f34adSIngo Molnar	 for it to trigger. The proof also does not depend on
2604d9f34adSIngo Molnar	 timing: if a race and a resulting deadlock is possible
2614d9f34adSIngo Molnar	 theoretically (no matter how unlikely the race scenario
2624d9f34adSIngo Molnar	 is), it will be proven so and will immediately be
2634d9f34adSIngo Molnar	 reported by the kernel (once the event is observed that
2644d9f34adSIngo Molnar	 makes the deadlock theoretically possible).
2654d9f34adSIngo Molnar
2664d9f34adSIngo Molnar	 If a deadlock is impossible (i.e. the locking rules, as
2674d9f34adSIngo Molnar	 observed by the kernel, are mathematically correct), the
2684d9f34adSIngo Molnar	 kernel reports nothing.
2694d9f34adSIngo Molnar
2704d9f34adSIngo Molnar	 NOTE: this feature can also be enabled for rwlocks, mutexes
2714d9f34adSIngo Molnar	 and rwsems - in which case all dependencies between these
2724d9f34adSIngo Molnar	 different locking variants are observed and mapped too, and
2734d9f34adSIngo Molnar	 the proof of observed correctness is also maintained for an
2744d9f34adSIngo Molnar	 arbitrary combination of these separate locking variants.
2754d9f34adSIngo Molnar
2764d9f34adSIngo Molnar	 For more details, see Documentation/lockdep-design.txt.
2774d9f34adSIngo Molnar
2784d9f34adSIngo Molnarconfig LOCKDEP
2794d9f34adSIngo Molnar	bool
280517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
2814d9f34adSIngo Molnar	select STACKTRACE
28214cf232aSFranck Bui-Huu	select FRAME_POINTER if !X86 && !MIPS
2834d9f34adSIngo Molnar	select KALLSYMS
2844d9f34adSIngo Molnar	select KALLSYMS_ALL
2854d9f34adSIngo Molnar
286f20786ffSPeter Zijlstraconfig LOCK_STAT
287fdfb870fSDanny ter Haar	bool "Lock usage statistics"
288f20786ffSPeter Zijlstra	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
289f20786ffSPeter Zijlstra	select LOCKDEP
290f20786ffSPeter Zijlstra	select DEBUG_SPINLOCK
291f20786ffSPeter Zijlstra	select DEBUG_MUTEXES
292f20786ffSPeter Zijlstra	select DEBUG_LOCK_ALLOC
293f20786ffSPeter Zijlstra	default n
294f20786ffSPeter Zijlstra	help
295f20786ffSPeter Zijlstra	 This feature enables tracking lock contention points
296f20786ffSPeter Zijlstra
297a560aa48SPeter Zijlstra	 For more details, see Documentation/lockstat.txt
298a560aa48SPeter Zijlstra
2994d9f34adSIngo Molnarconfig DEBUG_LOCKDEP
3004d9f34adSIngo Molnar	bool "Lock dependency engine debugging"
301517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL && LOCKDEP
3024d9f34adSIngo Molnar	help
3034d9f34adSIngo Molnar	  If you say Y here, the lock dependency engine will do
3044d9f34adSIngo Molnar	  additional runtime checks to debug itself, at the price
3054d9f34adSIngo Molnar	  of more runtime overhead.
3064d9f34adSIngo Molnar
3074d9f34adSIngo Molnarconfig TRACE_IRQFLAGS
308517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL
3094d9f34adSIngo Molnar	bool
3104d9f34adSIngo Molnar	default y
3114d9f34adSIngo Molnar	depends on TRACE_IRQFLAGS_SUPPORT
3124d9f34adSIngo Molnar	depends on PROVE_LOCKING
3134d9f34adSIngo Molnar
3141da177e4SLinus Torvaldsconfig DEBUG_SPINLOCK_SLEEP
3154d9f34adSIngo Molnar	bool "Spinlock debugging: sleep-inside-spinlock checking"
3161da177e4SLinus Torvalds	depends on DEBUG_KERNEL
3171da177e4SLinus Torvalds	help
3181da177e4SLinus Torvalds	  If you say Y here, various routines which may sleep will become very
3191da177e4SLinus Torvalds	  noisy if they are called with a spinlock held.
3201da177e4SLinus Torvalds
321cae2ed9aSIngo Molnarconfig DEBUG_LOCKING_API_SELFTESTS
322cae2ed9aSIngo Molnar	bool "Locking API boot-time self-tests"
323cae2ed9aSIngo Molnar	depends on DEBUG_KERNEL
324cae2ed9aSIngo Molnar	help
325cae2ed9aSIngo Molnar	  Say Y here if you want the kernel to run a short self-test during
326cae2ed9aSIngo Molnar	  bootup. The self-test checks whether common types of locking bugs
327cae2ed9aSIngo Molnar	  are detected by debugging mechanisms or not. (if you disable
328cae2ed9aSIngo Molnar	  lock debugging then those bugs wont be detected of course.)
329cae2ed9aSIngo Molnar	  The following locking APIs are covered: spinlocks, rwlocks,
330cae2ed9aSIngo Molnar	  mutexes and rwsems.
331cae2ed9aSIngo Molnar
3328637c099SIngo Molnarconfig STACKTRACE
3338637c099SIngo Molnar	bool
334517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL
3358637c099SIngo Molnar	depends on STACKTRACE_SUPPORT
3368637c099SIngo Molnar
3371da177e4SLinus Torvaldsconfig DEBUG_KOBJECT
3381da177e4SLinus Torvalds	bool "kobject debugging"
3391da177e4SLinus Torvalds	depends on DEBUG_KERNEL
3401da177e4SLinus Torvalds	help
3411da177e4SLinus Torvalds	  If you say Y here, some extra kobject debugging messages will be sent
3421da177e4SLinus Torvalds	  to the syslog.
3431da177e4SLinus Torvalds
3441da177e4SLinus Torvaldsconfig DEBUG_HIGHMEM
3451da177e4SLinus Torvalds	bool "Highmem debugging"
3461da177e4SLinus Torvalds	depends on DEBUG_KERNEL && HIGHMEM
3471da177e4SLinus Torvalds	help
3481da177e4SLinus Torvalds	  This options enables addition error checking for high memory systems.
3491da177e4SLinus Torvalds	  Disable for production systems.
3501da177e4SLinus Torvalds
3511da177e4SLinus Torvaldsconfig DEBUG_BUGVERBOSE
3521da177e4SLinus Torvalds	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
353c8538a7aSMatt Mackall	depends on BUG
35499eb8a55SAdrian Bunk	depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || FRV || SUPERH || GENERIC_BUG || BFIN
3551da177e4SLinus Torvalds	default !EMBEDDED
3561da177e4SLinus Torvalds	help
3571da177e4SLinus Torvalds	  Say Y here to make BUG() panics output the file name and line number
3581da177e4SLinus Torvalds	  of the BUG call as well as the EIP and oops trace.  This aids
3591da177e4SLinus Torvalds	  debugging but costs about 70-100K of memory.
3601da177e4SLinus Torvalds
3611da177e4SLinus Torvaldsconfig DEBUG_INFO
3621da177e4SLinus Torvalds	bool "Compile the kernel with debug info"
3631da177e4SLinus Torvalds	depends on DEBUG_KERNEL
3641da177e4SLinus Torvalds	help
3651da177e4SLinus Torvalds          If you say Y here the resulting kernel image will include
3661da177e4SLinus Torvalds	  debugging info resulting in a larger kernel image.
367b72e53f8SAndreas Dilger	  This adds debug symbols to the kernel and modules (gcc -g), and
368b72e53f8SAndreas Dilger	  is needed if you intend to use kernel crashdump or binary object
369b72e53f8SAndreas Dilger	  tools like crash, kgdb, LKCD, gdb, etc on the kernel.
3701da177e4SLinus Torvalds	  Say Y here only if you plan to debug the kernel.
3711da177e4SLinus Torvalds
3721da177e4SLinus Torvalds	  If unsure, say N.
3731da177e4SLinus Torvalds
374a241ec65SPaul E. McKenneyconfig DEBUG_VM
375a241ec65SPaul E. McKenney	bool "Debug VM"
376a241ec65SPaul E. McKenney	depends on DEBUG_KERNEL
377a241ec65SPaul E. McKenney	help
37813e7444bSNick Piggin	  Enable this to turn on extended checks in the virtual-memory system
37913e7444bSNick Piggin          that may impact performance.
380a241ec65SPaul E. McKenney
381a241ec65SPaul E. McKenney	  If unsure, say N.
382a241ec65SPaul E. McKenney
383199a9afcSDave Jonesconfig DEBUG_LIST
384199a9afcSDave Jones	bool "Debug linked list manipulation"
385199a9afcSDave Jones	depends on DEBUG_KERNEL
386199a9afcSDave Jones	help
387199a9afcSDave Jones	  Enable this to turn on extended checks in the linked-list
388199a9afcSDave Jones	  walking routines.
389199a9afcSDave Jones
390199a9afcSDave Jones	  If unsure, say N.
391199a9afcSDave Jones
392*d6ec0842SJens Axboeconfig DEBUG_SG
393*d6ec0842SJens Axboe	bool "Debug SG table operations"
394*d6ec0842SJens Axboe	depends on DEBUG_KERNEL
395*d6ec0842SJens Axboe	help
396*d6ec0842SJens Axboe	  Enable this to turn on checks on scatter-gather tables. This can
397*d6ec0842SJens Axboe	  help find problems with drivers that do not properly initialize
398*d6ec0842SJens Axboe	  their sg tables.
399*d6ec0842SJens Axboe
400*d6ec0842SJens Axboe	  If unsure, say N.
401*d6ec0842SJens Axboe
4021da177e4SLinus Torvaldsconfig FRAME_POINTER
4031da177e4SLinus Torvalds	bool "Compile the kernel with frame pointers"
4041394f032SBryan Wu	depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH || BFIN)
40537fce857SPaolo 'Blaisorblade' Giarrusso	default y if DEBUG_INFO && UML
4061da177e4SLinus Torvalds	help
4071da177e4SLinus Torvalds	  If you say Y here the resulting kernel image will be slightly larger
4082a38bccdSJesper Juhl	  and slower, but it might give very useful debugging information on
4092a38bccdSJesper Juhl	  some architectures or if you use external debuggers.
410aeb39986SAndi Kleen	  If you don't debug the kernel, you can say N.
4111da177e4SLinus Torvalds
412a9df3d0fSIngo Molnarconfig FORCED_INLINING
413a9df3d0fSIngo Molnar	bool "Force gcc to inline functions marked 'inline'"
414a9df3d0fSIngo Molnar	depends on DEBUG_KERNEL
415a9df3d0fSIngo Molnar	default y
416a9df3d0fSIngo Molnar	help
417a9df3d0fSIngo Molnar	  This option determines if the kernel forces gcc to inline the functions
418a9df3d0fSIngo Molnar	  developers have marked 'inline'. Doing so takes away freedom from gcc to
419a9df3d0fSIngo Molnar	  do what it thinks is best, which is desirable for the gcc 3.x series of
420a9df3d0fSIngo Molnar	  compilers. The gcc 4.x series have a rewritten inlining algorithm and
421a9df3d0fSIngo Molnar	  disabling this option will generate a smaller kernel there. Hopefully
422a9df3d0fSIngo Molnar	  this algorithm is so good that allowing gcc4 to make the decision can
423a9df3d0fSIngo Molnar	  become the default in the future, until then this option is there to
424a9df3d0fSIngo Molnar	  test gcc for this.
425a9df3d0fSIngo Molnar
426bfe8df3dSRandy Dunlapconfig BOOT_PRINTK_DELAY
427bfe8df3dSRandy Dunlap	bool "Delay each boot printk message by N milliseconds"
428bfe8df3dSRandy Dunlap	depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
429bfe8df3dSRandy Dunlap	help
430bfe8df3dSRandy Dunlap	  This build option allows you to read kernel boot messages
431bfe8df3dSRandy Dunlap	  by inserting a short delay after each one.  The delay is
432bfe8df3dSRandy Dunlap	  specified in milliseconds on the kernel command line,
433bfe8df3dSRandy Dunlap	  using "boot_delay=N".
434bfe8df3dSRandy Dunlap
435bfe8df3dSRandy Dunlap	  It is likely that you would also need to use "lpj=M" to preset
436bfe8df3dSRandy Dunlap	  the "loops per jiffie" value.
437bfe8df3dSRandy Dunlap	  See a previous boot log for the "lpj" value to use for your
438bfe8df3dSRandy Dunlap	  system, and then set "lpj=M" before setting "boot_delay=N".
439bfe8df3dSRandy Dunlap	  NOTE:  Using this option may adversely affect SMP systems.
440bfe8df3dSRandy Dunlap	  I.e., processors other than the first one may not boot up.
441bfe8df3dSRandy Dunlap	  BOOT_PRINTK_DELAY also may cause DETECT_SOFTLOCKUP to detect
442bfe8df3dSRandy Dunlap	  what it believes to be lockup conditions.
443bfe8df3dSRandy Dunlap
444a241ec65SPaul E. McKenneyconfig RCU_TORTURE_TEST
445a241ec65SPaul E. McKenney	tristate "torture tests for RCU"
446a241ec65SPaul E. McKenney	depends on DEBUG_KERNEL
4479aaffc89SPaul E. McKenney	depends on m
448a241ec65SPaul E. McKenney	default n
449a241ec65SPaul E. McKenney	help
450a241ec65SPaul E. McKenney	  This option provides a kernel module that runs torture tests
451a241ec65SPaul E. McKenney	  on the RCU infrastructure.  The kernel module may be built
452a241ec65SPaul E. McKenney	  after the fact on the running kernel to be tested, if desired.
453a241ec65SPaul E. McKenney
454a241ec65SPaul E. McKenney	  Say M if you want the RCU torture tests to build as a module.
455a241ec65SPaul E. McKenney	  Say N if you are unsure.
4568bb31b9dSAnkita Garg
4578bb31b9dSAnkita Gargconfig LKDTM
4588bb31b9dSAnkita Garg	tristate "Linux Kernel Dump Test Tool Module"
459bf4735a4SDon Mullis	depends on DEBUG_KERNEL
4608bb31b9dSAnkita Garg	depends on KPROBES
4618bb31b9dSAnkita Garg	default n
4628bb31b9dSAnkita Garg	help
4638bb31b9dSAnkita Garg	This module enables testing of the different dumping mechanisms by
4648bb31b9dSAnkita Garg	inducing system failures at predefined crash points.
4658bb31b9dSAnkita Garg	If you don't need it: say N
4668bb31b9dSAnkita Garg	Choose M here to compile this code as a module. The module will be
4678bb31b9dSAnkita Garg	called lkdtm.
4688bb31b9dSAnkita Garg
4698bb31b9dSAnkita Garg	Documentation on how to use the module can be found in
4708bb31b9dSAnkita Garg	drivers/misc/lkdtm.c
4716ff1cb35SAkinobu Mita
4726ff1cb35SAkinobu Mitaconfig FAULT_INJECTION
4731ab8509aSAndrew Morton	bool "Fault-injection framework"
4741ab8509aSAndrew Morton	depends on DEBUG_KERNEL
475329409aeSAkinobu Mita	help
476329409aeSAkinobu Mita	  Provide fault-injection framework.
477329409aeSAkinobu Mita	  For more details, see Documentation/fault-injection/.
4786ff1cb35SAkinobu Mita
4798a8b6502SAkinobu Mitaconfig FAILSLAB
4801ab8509aSAndrew Morton	bool "Fault-injection capability for kmalloc"
4811ab8509aSAndrew Morton	depends on FAULT_INJECTION
4828a8b6502SAkinobu Mita	help
4831ab8509aSAndrew Morton	  Provide fault-injection capability for kmalloc.
4848a8b6502SAkinobu Mita
485933e312eSAkinobu Mitaconfig FAIL_PAGE_ALLOC
486933e312eSAkinobu Mita	bool "Fault-injection capabilitiy for alloc_pages()"
4871ab8509aSAndrew Morton	depends on FAULT_INJECTION
488933e312eSAkinobu Mita	help
4891ab8509aSAndrew Morton	  Provide fault-injection capability for alloc_pages().
490933e312eSAkinobu Mita
491c17bb495SAkinobu Mitaconfig FAIL_MAKE_REQUEST
49286327d19SDave Jones	bool "Fault-injection capability for disk IO"
4931ab8509aSAndrew Morton	depends on FAULT_INJECTION
494c17bb495SAkinobu Mita	help
4951ab8509aSAndrew Morton	  Provide fault-injection capability for disk IO.
496c17bb495SAkinobu Mita
4976ff1cb35SAkinobu Mitaconfig FAULT_INJECTION_DEBUG_FS
4986ff1cb35SAkinobu Mita	bool "Debugfs entries for fault-injection capabilities"
4991ab8509aSAndrew Morton	depends on FAULT_INJECTION && SYSFS && DEBUG_FS
5006ff1cb35SAkinobu Mita	help
5011ab8509aSAndrew Morton	  Enable configuration of fault-injection capabilities via debugfs.
5021df49008SAkinobu Mita
5031df49008SAkinobu Mitaconfig FAULT_INJECTION_STACKTRACE_FILTER
5041df49008SAkinobu Mita	bool "stacktrace filter for fault-injection capabilities"
5051df49008SAkinobu Mita	depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
5066d690dcaSAkinobu Mita	depends on !X86_64
5071df49008SAkinobu Mita	select STACKTRACE
5081df49008SAkinobu Mita	select FRAME_POINTER
5091df49008SAkinobu Mita	help
5101df49008SAkinobu Mita	  Provide stacktrace filter for fault-injection capabilities
511267c4025SMathieu Desnoyers
512267c4025SMathieu Desnoyerssource "samples/Kconfig"
513