xref: /linux/lib/Kconfig.debug (revision 9b2a60c484715e2d2f07d8192fd9f18435cbc77c)
11da177e4SLinus Torvalds
21da177e4SLinus Torvaldsconfig PRINTK_TIME
31da177e4SLinus Torvalds	bool "Show timing information on printks"
4d3b8b6e5SRandy Dunlap	depends on PRINTK
51da177e4SLinus Torvalds	help
6649e6ee3SKay Sievers	  Selecting this option causes time stamps of the printk()
7649e6ee3SKay Sievers	  messages to be added to the output of the syslog() system
8649e6ee3SKay Sievers	  call and at the console.
9649e6ee3SKay Sievers
10649e6ee3SKay Sievers	  The timestamp is always recorded internally, and exported
11649e6ee3SKay Sievers	  to /dev/kmsg. This flag just specifies if the timestamp should
12649e6ee3SKay Sievers	  be included, not that the timestamp is recorded.
13649e6ee3SKay Sievers
14649e6ee3SKay Sievers	  The behavior is also controlled by the kernel command line
15649e6ee3SKay Sievers	  parameter printk.time=1. See Documentation/kernel-parameters.txt
161da177e4SLinus Torvalds
175af5bcb8SMandeep Singh Bainesconfig DEFAULT_MESSAGE_LOGLEVEL
185af5bcb8SMandeep Singh Baines	int "Default message log level (1-7)"
195af5bcb8SMandeep Singh Baines	range 1 7
205af5bcb8SMandeep Singh Baines	default "4"
215af5bcb8SMandeep Singh Baines	help
225af5bcb8SMandeep Singh Baines	  Default log level for printk statements with no specified priority.
235af5bcb8SMandeep Singh Baines
245af5bcb8SMandeep Singh Baines	  This was hard-coded to KERN_WARNING since at least 2.6.10 but folks
255af5bcb8SMandeep Singh Baines	  that are auditing their logs closely may want to set it to a lower
265af5bcb8SMandeep Singh Baines	  priority.
275af5bcb8SMandeep Singh Baines
28de488443SJeff Garzikconfig ENABLE_WARN_DEPRECATED
29de488443SJeff Garzik	bool "Enable __deprecated logic"
30de488443SJeff Garzik	default y
31de488443SJeff Garzik	help
32de488443SJeff Garzik	  Enable the __deprecated logic in the kernel build.
33de488443SJeff Garzik	  Disable this to suppress the "warning: 'foo' is deprecated
34de488443SJeff Garzik	  (declared at kernel/power/somefile.c:1234)" messages.
35de488443SJeff Garzik
36cebc04baSAndrew Mortonconfig ENABLE_MUST_CHECK
37cebc04baSAndrew Morton	bool "Enable __must_check logic"
38cebc04baSAndrew Morton	default y
39cebc04baSAndrew Morton	help
40cebc04baSAndrew Morton	  Enable the __must_check logic in the kernel build.  Disable this to
41cebc04baSAndrew Morton	  suppress the "warning: ignoring return value of 'foo', declared with
42cebc04baSAndrew Morton	  attribute warn_unused_result" messages.
431da177e4SLinus Torvalds
4435bb5b1eSAndi Kleenconfig FRAME_WARN
4535bb5b1eSAndi Kleen	int "Warn for stack frames larger than (needs gcc 4.4)"
4635bb5b1eSAndi Kleen	range 0 8192
4735bb5b1eSAndi Kleen	default 1024 if !64BIT
4835bb5b1eSAndi Kleen	default 2048 if 64BIT
4935bb5b1eSAndi Kleen	help
5035bb5b1eSAndi Kleen	  Tell gcc to warn at build time for stack frames larger than this.
5135bb5b1eSAndi Kleen	  Setting this too low will cause a lot of warnings.
5235bb5b1eSAndi Kleen	  Setting it to 0 disables the warning.
5335bb5b1eSAndi Kleen	  Requires gcc 4.4
5435bb5b1eSAndi Kleen
551da177e4SLinus Torvaldsconfig MAGIC_SYSRQ
561da177e4SLinus Torvalds	bool "Magic SysRq key"
57f346f4b3SAdrian Bunk	depends on !UML
581da177e4SLinus Torvalds	help
591da177e4SLinus Torvalds	  If you say Y here, you will have some control over the system even
601da177e4SLinus Torvalds	  if the system crashes for example during kernel debugging (e.g., you
611da177e4SLinus Torvalds	  will be able to flush the buffer cache to disk, reboot the system
621da177e4SLinus Torvalds	  immediately or dump some status information). This is accomplished
631da177e4SLinus Torvalds	  by pressing various keys while holding SysRq (Alt+PrintScreen). It
641da177e4SLinus Torvalds	  also works on a serial console (on PC hardware at least), if you
651da177e4SLinus Torvalds	  send a BREAK and then within 5 seconds a command keypress. The
661da177e4SLinus Torvalds	  keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
671da177e4SLinus Torvalds	  unless you really know what this hack does.
681da177e4SLinus Torvalds
6999657c78SRandy Dunlapconfig STRIP_ASM_SYMS
7099657c78SRandy Dunlap	bool "Strip assembler-generated symbols during link"
7199657c78SRandy Dunlap	default n
7299657c78SRandy Dunlap	help
7399657c78SRandy Dunlap	  Strip internal assembler-generated symbols during a link (symbols
7499657c78SRandy Dunlap	  that look like '.Lxxx') so they don't pollute the output of
7599657c78SRandy Dunlap	  get_wchan() and suchlike.
7699657c78SRandy Dunlap
771873e870SAndi Kleenconfig READABLE_ASM
781873e870SAndi Kleen        bool "Generate readable assembler code"
791873e870SAndi Kleen        depends on DEBUG_KERNEL
801873e870SAndi Kleen        help
811873e870SAndi Kleen          Disable some compiler optimizations that tend to generate human unreadable
821873e870SAndi Kleen          assembler output. This may make the kernel slightly slower, but it helps
831873e870SAndi Kleen          to keep kernel developers who have to stare a lot at assembler listings
841873e870SAndi Kleen          sane.
851873e870SAndi Kleen
86f71d20e9SArjan van de Venconfig UNUSED_SYMBOLS
87f71d20e9SArjan van de Ven	bool "Enable unused/obsolete exported symbols"
88f71d20e9SArjan van de Ven	default y if X86
89f71d20e9SArjan van de Ven	help
90f71d20e9SArjan van de Ven	  Unused but exported symbols make the kernel needlessly bigger.  For
91f71d20e9SArjan van de Ven	  that reason most of these unused exports will soon be removed.  This
92f71d20e9SArjan van de Ven	  option is provided temporarily to provide a transition period in case
93f71d20e9SArjan van de Ven	  some external kernel module needs one of these symbols anyway. If you
94f71d20e9SArjan van de Ven	  encounter such a case in your module, consider if you are actually
95f71d20e9SArjan van de Ven	  using the right API.  (rationale: since nobody in the kernel is using
96f71d20e9SArjan van de Ven	  this in a module, there is a pretty good chance it's actually the
97f71d20e9SArjan van de Ven	  wrong interface to use).  If you really need the symbol, please send a
98f71d20e9SArjan van de Ven	  mail to the linux kernel mailing list mentioning the symbol and why
99f71d20e9SArjan van de Ven	  you really need it, and what the merge plan to the mainline kernel for
100f71d20e9SArjan van de Ven	  your module is.
101f71d20e9SArjan van de Ven
102bf4735a4SDon Mullisconfig DEBUG_FS
103bf4735a4SDon Mullis	bool "Debug Filesystem"
104bf4735a4SDon Mullis	help
105bf4735a4SDon Mullis	  debugfs is a virtual file system that kernel developers use to put
106bf4735a4SDon Mullis	  debugging files into.  Enable this option to be able to read and
107bf4735a4SDon Mullis	  write to these files.
108bf4735a4SDon Mullis
109ff543332SRobert P. J. Day	  For detailed documentation on the debugfs API, see
110ff543332SRobert P. J. Day	  Documentation/DocBook/filesystems.
111ff543332SRobert P. J. Day
112bf4735a4SDon Mullis	  If unsure, say N.
113bf4735a4SDon Mullis
114bf4735a4SDon Mullisconfig HEADERS_CHECK
115bf4735a4SDon Mullis	bool "Run 'make headers_check' when building vmlinux"
116bf4735a4SDon Mullis	depends on !UML
117bf4735a4SDon Mullis	help
118bf4735a4SDon Mullis	  This option will extract the user-visible kernel headers whenever
119bf4735a4SDon Mullis	  building the kernel, and will run basic sanity checks on them to
120bf4735a4SDon Mullis	  ensure that exported files do not attempt to include files which
121bf4735a4SDon Mullis	  were not exported, etc.
122bf4735a4SDon Mullis
123bf4735a4SDon Mullis	  If you're making modifications to header files which are
124bf4735a4SDon Mullis	  relevant for userspace, say 'Y', and check the headers
125bf4735a4SDon Mullis	  exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
126bf4735a4SDon Mullis	  your build tree), to make sure they're suitable.
127bf4735a4SDon Mullis
12891341d4bSSam Ravnborgconfig DEBUG_SECTION_MISMATCH
12991341d4bSSam Ravnborg	bool "Enable full Section mismatch analysis"
13091341d4bSSam Ravnborg	help
13191341d4bSSam Ravnborg	  The section mismatch analysis checks if there are illegal
13291341d4bSSam Ravnborg	  references from one section to another section.
133e809ab01SMichael Witten	  During linktime or runtime, some sections are dropped;
134e809ab01SMichael Witten	  any use of code/data previously in these sections would
13591341d4bSSam Ravnborg	  most likely result in an oops.
136e809ab01SMichael Witten	  In the code, functions and variables are annotated with
137e809ab01SMichael Witten	  __init, __devinit, etc. (see the full list in include/linux/init.h),
138d6fbfa4fSGeert Uytterhoeven	  which results in the code/data being placed in specific sections.
139e809ab01SMichael Witten	  The section mismatch analysis is always performed after a full
140e809ab01SMichael Witten	  kernel build, and enabling this option causes the following
141e809ab01SMichael Witten	  additional steps to occur:
142e809ab01SMichael Witten	  - Add the option -fno-inline-functions-called-once to gcc commands.
143e809ab01SMichael Witten	    When inlining a function annotated with __init in a non-init
144e809ab01SMichael Witten	    function, we would lose the section information and thus
14591341d4bSSam Ravnborg	    the analysis would not catch the illegal reference.
146e809ab01SMichael Witten	    This option tells gcc to inline less (but it does result in
147e809ab01SMichael Witten	    a larger kernel).
148e809ab01SMichael Witten	  - Run the section mismatch analysis for each module/built-in.o file.
149e809ab01SMichael Witten	    When we run the section mismatch analysis on vmlinux.o, we
150d6fbfa4fSGeert Uytterhoeven	    lose valueble information about where the mismatch was
15191341d4bSSam Ravnborg	    introduced.
15291341d4bSSam Ravnborg	    Running the analysis for each module/built-in.o file
153e809ab01SMichael Witten	    tells where the mismatch happens much closer to the
154e809ab01SMichael Witten	    source. The drawback is that the same mismatch is
155e809ab01SMichael Witten	    reported at least twice.
156e809ab01SMichael Witten	  - Enable verbose reporting from modpost in order to help resolve
157e809ab01SMichael Witten	    the section mismatches that are reported.
15891341d4bSSam Ravnborg
159f346f4b3SAdrian Bunkconfig DEBUG_KERNEL
160f346f4b3SAdrian Bunk	bool "Kernel debugging"
161f346f4b3SAdrian Bunk	help
162f346f4b3SAdrian Bunk	  Say Y here if you are developing drivers or trying to debug and
163f346f4b3SAdrian Bunk	  identify kernel problems.
164f346f4b3SAdrian Bunk
165a304e1b8SDavid Woodhouseconfig DEBUG_SHIRQ
166a304e1b8SDavid Woodhouse	bool "Debug shared IRQ handlers"
167a304e1b8SDavid Woodhouse	depends on DEBUG_KERNEL && GENERIC_HARDIRQS
168a304e1b8SDavid Woodhouse	help
169a304e1b8SDavid Woodhouse	  Enable this to generate a spurious interrupt as soon as a shared
170a304e1b8SDavid Woodhouse	  interrupt handler is registered, and just before one is deregistered.
171a304e1b8SDavid Woodhouse	  Drivers ought to be able to handle interrupts coming in at those
172a304e1b8SDavid Woodhouse	  points; some don't and need to be caught.
173a304e1b8SDavid Woodhouse
17458687acbSDon Zickusconfig LOCKUP_DETECTOR
17558687acbSDon Zickus	bool "Detect Hard and Soft Lockups"
176dea20a3fSHeiko Carstens	depends on DEBUG_KERNEL && !S390
1778446f1d3SIngo Molnar	help
17858687acbSDon Zickus	  Say Y here to enable the kernel to act as a watchdog to detect
17958687acbSDon Zickus	  hard and soft lockups.
18084e478c6SDon Zickus
18158687acbSDon Zickus	  Softlockups are bugs that cause the kernel to loop in kernel
1825f329089SFernando Luis Vázquez Cao	  mode for more than 20 seconds, without giving other tasks a
18358687acbSDon Zickus	  chance to run.  The current stack trace is displayed upon
18458687acbSDon Zickus	  detection and the system will stay locked up.
1858446f1d3SIngo Molnar
18658687acbSDon Zickus	  Hardlockups are bugs that cause the CPU to loop in kernel mode
1875f329089SFernando Luis Vázquez Cao	  for more than 10 seconds, without letting other interrupts have a
18858687acbSDon Zickus	  chance to run.  The current stack trace is displayed upon detection
18958687acbSDon Zickus	  and the system will stay locked up.
1908446f1d3SIngo Molnar
19158687acbSDon Zickus	  The overhead should be minimal.  A periodic hrtimer runs to
1925f329089SFernando Luis Vázquez Cao	  generate interrupts and kick the watchdog task every 4 seconds.
1935f329089SFernando Luis Vázquez Cao	  An NMI is generated every 10 seconds or so to check for hardlockups.
1945f329089SFernando Luis Vázquez Cao
1955f329089SFernando Luis Vázquez Cao	  The frequency of hrtimer and NMI events and the soft and hard lockup
1965f329089SFernando Luis Vázquez Cao	  thresholds can be controlled through the sysctl watchdog_thresh.
19784e478c6SDon Zickus
19823637d47SFrederic Weisbeckerconfig HARDLOCKUP_DETECTOR
1998f1f66edSJan Beulich	def_bool y
2008f1f66edSJan Beulich	depends on LOCKUP_DETECTOR && !HAVE_NMI_WATCHDOG
2018f1f66edSJan Beulich	depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI
2028446f1d3SIngo Molnar
203fef2c9bcSDon Zickusconfig BOOTPARAM_HARDLOCKUP_PANIC
204fef2c9bcSDon Zickus	bool "Panic (Reboot) On Hard Lockups"
2058f1f66edSJan Beulich	depends on HARDLOCKUP_DETECTOR
206fef2c9bcSDon Zickus	help
207fef2c9bcSDon Zickus	  Say Y here to enable the kernel to panic on "hard lockups",
208fef2c9bcSDon Zickus	  which are bugs that cause the kernel to loop in kernel
2095f329089SFernando Luis Vázquez Cao	  mode with interrupts disabled for more than 10 seconds (configurable
2105f329089SFernando Luis Vázquez Cao	  using the watchdog_thresh sysctl).
211fef2c9bcSDon Zickus
212fef2c9bcSDon Zickus	  Say N if unsure.
213fef2c9bcSDon Zickus
214fef2c9bcSDon Zickusconfig BOOTPARAM_HARDLOCKUP_PANIC_VALUE
215fef2c9bcSDon Zickus	int
2168f1f66edSJan Beulich	depends on HARDLOCKUP_DETECTOR
217fef2c9bcSDon Zickus	range 0 1
218fef2c9bcSDon Zickus	default 0 if !BOOTPARAM_HARDLOCKUP_PANIC
219fef2c9bcSDon Zickus	default 1 if BOOTPARAM_HARDLOCKUP_PANIC
220fef2c9bcSDon Zickus
2219c44bc03SIngo Molnarconfig BOOTPARAM_SOFTLOCKUP_PANIC
2229c44bc03SIngo Molnar	bool "Panic (Reboot) On Soft Lockups"
22389d7ce2aSFrederic Weisbecker	depends on LOCKUP_DETECTOR
2249c44bc03SIngo Molnar	help
2259c44bc03SIngo Molnar	  Say Y here to enable the kernel to panic on "soft lockups",
2269c44bc03SIngo Molnar	  which are bugs that cause the kernel to loop in kernel
2275f329089SFernando Luis Vázquez Cao	  mode for more than 20 seconds (configurable using the watchdog_thresh
2285f329089SFernando Luis Vázquez Cao	  sysctl), without giving other tasks a chance to run.
2299c44bc03SIngo Molnar
2309c44bc03SIngo Molnar	  The panic can be used in combination with panic_timeout,
2319c44bc03SIngo Molnar	  to cause the system to reboot automatically after a
2329c44bc03SIngo Molnar	  lockup has been detected. This feature is useful for
2339c44bc03SIngo Molnar	  high-availability systems that have uptime guarantees and
2349c44bc03SIngo Molnar	  where a lockup must be resolved ASAP.
2359c44bc03SIngo Molnar
2369c44bc03SIngo Molnar	  Say N if unsure.
2379c44bc03SIngo Molnar
2389c44bc03SIngo Molnarconfig BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
2399c44bc03SIngo Molnar	int
240e16bb1d7SFrederic Weisbecker	depends on LOCKUP_DETECTOR
2419c44bc03SIngo Molnar	range 0 1
2429c44bc03SIngo Molnar	default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
2439c44bc03SIngo Molnar	default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
2449c44bc03SIngo Molnar
2452a01bb38SKyle McMartinconfig PANIC_ON_OOPS
2462a01bb38SKyle McMartin	bool "Panic on Oops" if EXPERT
2472a01bb38SKyle McMartin	default n
2482a01bb38SKyle McMartin	help
2492a01bb38SKyle McMartin	  Say Y here to enable the kernel to panic when it oopses. This
2502a01bb38SKyle McMartin	  has the same effect as setting oops=panic on the kernel command
2512a01bb38SKyle McMartin	  line.
2522a01bb38SKyle McMartin
2532a01bb38SKyle McMartin	  This feature is useful to ensure that the kernel does not do
2542a01bb38SKyle McMartin	  anything erroneous after an oops which could result in data
2552a01bb38SKyle McMartin	  corruption or other issues.
2562a01bb38SKyle McMartin
2572a01bb38SKyle McMartin	  Say N if unsure.
2582a01bb38SKyle McMartin
2592a01bb38SKyle McMartinconfig PANIC_ON_OOPS_VALUE
2602a01bb38SKyle McMartin	int
2612a01bb38SKyle McMartin	range 0 1
2622a01bb38SKyle McMartin	default 0 if !PANIC_ON_OOPS
2632a01bb38SKyle McMartin	default 1 if PANIC_ON_OOPS
2642a01bb38SKyle McMartin
265e162b39aSMandeep Singh Bainesconfig DETECT_HUNG_TASK
266e162b39aSMandeep Singh Baines	bool "Detect Hung Tasks"
267e162b39aSMandeep Singh Baines	depends on DEBUG_KERNEL
2688edbb83eSAnton Blanchard	default LOCKUP_DETECTOR
269e162b39aSMandeep Singh Baines	help
270e162b39aSMandeep Singh Baines	  Say Y here to enable the kernel to detect "hung tasks",
271e162b39aSMandeep Singh Baines	  which are bugs that cause the task to be stuck in
272e162b39aSMandeep Singh Baines	  uninterruptible "D" state indefinitiley.
273e162b39aSMandeep Singh Baines
274e162b39aSMandeep Singh Baines	  When a hung task is detected, the kernel will print the
275e162b39aSMandeep Singh Baines	  current stack trace (which you should report), but the
276e162b39aSMandeep Singh Baines	  task will stay in uninterruptible state. If lockdep is
277e162b39aSMandeep Singh Baines	  enabled then all held locks will also be reported. This
278e162b39aSMandeep Singh Baines	  feature has negligible overhead.
279e162b39aSMandeep Singh Baines
280e11feaa1SJeff Mahoneyconfig DEFAULT_HUNG_TASK_TIMEOUT
281e11feaa1SJeff Mahoney	int "Default timeout for hung task detection (in seconds)"
282e11feaa1SJeff Mahoney	depends on DETECT_HUNG_TASK
283e11feaa1SJeff Mahoney	default 120
284e11feaa1SJeff Mahoney	help
285e11feaa1SJeff Mahoney	  This option controls the default timeout (in seconds) used
286e11feaa1SJeff Mahoney	  to determine when a task has become non-responsive and should
287e11feaa1SJeff Mahoney	  be considered hung.
288e11feaa1SJeff Mahoney
289c51eaaccSJiaju Zhang	  It can be adjusted at runtime via the kernel.hung_task_timeout_secs
290c51eaaccSJiaju Zhang	  sysctl or by writing a value to
291c51eaaccSJiaju Zhang	  /proc/sys/kernel/hung_task_timeout_secs.
292e11feaa1SJeff Mahoney
293e11feaa1SJeff Mahoney	  A timeout of 0 disables the check.  The default is two minutes.
294e11feaa1SJeff Mahoney	  Keeping the default should be fine in most cases.
295e11feaa1SJeff Mahoney
296e162b39aSMandeep Singh Bainesconfig BOOTPARAM_HUNG_TASK_PANIC
297e162b39aSMandeep Singh Baines	bool "Panic (Reboot) On Hung Tasks"
298e162b39aSMandeep Singh Baines	depends on DETECT_HUNG_TASK
299e162b39aSMandeep Singh Baines	help
300e162b39aSMandeep Singh Baines	  Say Y here to enable the kernel to panic on "hung tasks",
301e162b39aSMandeep Singh Baines	  which are bugs that cause the kernel to leave a task stuck
302e162b39aSMandeep Singh Baines	  in uninterruptible "D" state.
303e162b39aSMandeep Singh Baines
304e162b39aSMandeep Singh Baines	  The panic can be used in combination with panic_timeout,
305e162b39aSMandeep Singh Baines	  to cause the system to reboot automatically after a
306e162b39aSMandeep Singh Baines	  hung task has been detected. This feature is useful for
307e162b39aSMandeep Singh Baines	  high-availability systems that have uptime guarantees and
308e162b39aSMandeep Singh Baines	  where a hung tasks must be resolved ASAP.
309e162b39aSMandeep Singh Baines
310e162b39aSMandeep Singh Baines	  Say N if unsure.
311e162b39aSMandeep Singh Baines
312e162b39aSMandeep Singh Bainesconfig BOOTPARAM_HUNG_TASK_PANIC_VALUE
313e162b39aSMandeep Singh Baines	int
314e162b39aSMandeep Singh Baines	depends on DETECT_HUNG_TASK
315e162b39aSMandeep Singh Baines	range 0 1
316e162b39aSMandeep Singh Baines	default 0 if !BOOTPARAM_HUNG_TASK_PANIC
317e162b39aSMandeep Singh Baines	default 1 if BOOTPARAM_HUNG_TASK_PANIC
318e162b39aSMandeep Singh Baines
319b642b6d3SIngo Molnarconfig SCHED_DEBUG
320b642b6d3SIngo Molnar	bool "Collect scheduler debugging info"
321b642b6d3SIngo Molnar	depends on DEBUG_KERNEL && PROC_FS
322b642b6d3SIngo Molnar	default y
323b642b6d3SIngo Molnar	help
324b642b6d3SIngo Molnar	  If you say Y here, the /proc/sched_debug file will be provided
325b642b6d3SIngo Molnar	  that can help debug the scheduler. The runtime overhead of this
326b642b6d3SIngo Molnar	  option is minimal.
327b642b6d3SIngo Molnar
3281da177e4SLinus Torvaldsconfig SCHEDSTATS
3291da177e4SLinus Torvalds	bool "Collect scheduler statistics"
3301da177e4SLinus Torvalds	depends on DEBUG_KERNEL && PROC_FS
3311da177e4SLinus Torvalds	help
3321da177e4SLinus Torvalds	  If you say Y here, additional code will be inserted into the
3331da177e4SLinus Torvalds	  scheduler and related routines to collect statistics about
3341da177e4SLinus Torvalds	  scheduler behavior and provide them in /proc/schedstat.  These
3351da177e4SLinus Torvalds	  stats may be useful for both tuning and debugging the scheduler
3361da177e4SLinus Torvalds	  If you aren't debugging the scheduler or trying to tune a specific
3371da177e4SLinus Torvalds	  application, you can say N to avoid the very slight overhead
3381da177e4SLinus Torvalds	  this adds.
3391da177e4SLinus Torvalds
34082f67cd9SIngo Molnarconfig TIMER_STATS
34182f67cd9SIngo Molnar	bool "Collect kernel timers statistics"
34282f67cd9SIngo Molnar	depends on DEBUG_KERNEL && PROC_FS
34382f67cd9SIngo Molnar	help
34482f67cd9SIngo Molnar	  If you say Y here, additional code will be inserted into the
34582f67cd9SIngo Molnar	  timer routines to collect statistics about kernel timers being
34682f67cd9SIngo Molnar	  reprogrammed. The statistics can be read from /proc/timer_stats.
34782f67cd9SIngo Molnar	  The statistics collection is started by writing 1 to /proc/timer_stats,
34882f67cd9SIngo Molnar	  writing 0 stops it. This feature is useful to collect information
349c1a834dcSIngo Molnar	  about timer usage patterns in kernel and userspace. This feature
350c1a834dcSIngo Molnar	  is lightweight if enabled in the kernel config but not activated
351c1a834dcSIngo Molnar	  (it defaults to deactivated on bootup and will only be activated
352c1a834dcSIngo Molnar	  if some application like powertop activates it explicitly).
35382f67cd9SIngo Molnar
3543ac7fe5aSThomas Gleixnerconfig DEBUG_OBJECTS
3553ac7fe5aSThomas Gleixner	bool "Debug object operations"
3563ac7fe5aSThomas Gleixner	depends on DEBUG_KERNEL
3573ac7fe5aSThomas Gleixner	help
3583ac7fe5aSThomas Gleixner	  If you say Y here, additional code will be inserted into the
3593ac7fe5aSThomas Gleixner	  kernel to track the life time of various objects and validate
3603ac7fe5aSThomas Gleixner	  the operations on those objects.
3613ac7fe5aSThomas Gleixner
3623ac7fe5aSThomas Gleixnerconfig DEBUG_OBJECTS_SELFTEST
3633ac7fe5aSThomas Gleixner	bool "Debug objects selftest"
3643ac7fe5aSThomas Gleixner	depends on DEBUG_OBJECTS
3653ac7fe5aSThomas Gleixner	help
3663ac7fe5aSThomas Gleixner	  This enables the selftest of the object debug code.
3673ac7fe5aSThomas Gleixner
3683ac7fe5aSThomas Gleixnerconfig DEBUG_OBJECTS_FREE
3693ac7fe5aSThomas Gleixner	bool "Debug objects in freed memory"
3703ac7fe5aSThomas Gleixner	depends on DEBUG_OBJECTS
3713ac7fe5aSThomas Gleixner	help
3723ac7fe5aSThomas Gleixner	  This enables checks whether a k/v free operation frees an area
3733ac7fe5aSThomas Gleixner	  which contains an object which has not been deactivated
3743ac7fe5aSThomas Gleixner	  properly. This can make kmalloc/kfree-intensive workloads
3753ac7fe5aSThomas Gleixner	  much slower.
3763ac7fe5aSThomas Gleixner
377c6f3a97fSThomas Gleixnerconfig DEBUG_OBJECTS_TIMERS
378c6f3a97fSThomas Gleixner	bool "Debug timer objects"
379c6f3a97fSThomas Gleixner	depends on DEBUG_OBJECTS
380c6f3a97fSThomas Gleixner	help
381c6f3a97fSThomas Gleixner	  If you say Y here, additional code will be inserted into the
382c6f3a97fSThomas Gleixner	  timer routines to track the life time of timer objects and
383c6f3a97fSThomas Gleixner	  validate the timer operations.
384c6f3a97fSThomas Gleixner
385dc186ad7SThomas Gleixnerconfig DEBUG_OBJECTS_WORK
386dc186ad7SThomas Gleixner	bool "Debug work objects"
387dc186ad7SThomas Gleixner	depends on DEBUG_OBJECTS
388dc186ad7SThomas Gleixner	help
389dc186ad7SThomas Gleixner	  If you say Y here, additional code will be inserted into the
390dc186ad7SThomas Gleixner	  work queue routines to track the life time of work objects and
391dc186ad7SThomas Gleixner	  validate the work operations.
392dc186ad7SThomas Gleixner
393551d55a9SMathieu Desnoyersconfig DEBUG_OBJECTS_RCU_HEAD
394551d55a9SMathieu Desnoyers	bool "Debug RCU callbacks objects"
395fc2ecf7eSMathieu Desnoyers	depends on DEBUG_OBJECTS
396551d55a9SMathieu Desnoyers	help
397551d55a9SMathieu Desnoyers	  Enable this to turn on debugging of RCU list heads (call_rcu() usage).
398551d55a9SMathieu Desnoyers
399e2852ae8STejun Heoconfig DEBUG_OBJECTS_PERCPU_COUNTER
400e2852ae8STejun Heo	bool "Debug percpu counter objects"
401e2852ae8STejun Heo	depends on DEBUG_OBJECTS
402e2852ae8STejun Heo	help
403e2852ae8STejun Heo	  If you say Y here, additional code will be inserted into the
404e2852ae8STejun Heo	  percpu counter routines to track the life time of percpu counter
405e2852ae8STejun Heo	  objects and validate the percpu counter operations.
406e2852ae8STejun Heo
4073ae70205SIngo Molnarconfig DEBUG_OBJECTS_ENABLE_DEFAULT
4083ae70205SIngo Molnar	int "debug_objects bootup default value (0-1)"
4093ae70205SIngo Molnar        range 0 1
4103ae70205SIngo Molnar        default "1"
4113ae70205SIngo Molnar        depends on DEBUG_OBJECTS
4123ae70205SIngo Molnar        help
4133ae70205SIngo Molnar          Debug objects boot parameter default value
4143ae70205SIngo Molnar
4151da177e4SLinus Torvaldsconfig DEBUG_SLAB
4164a2f0acfSAndrew Morton	bool "Debug slab memory allocations"
4177d46d9e6SVegard Nossum	depends on DEBUG_KERNEL && SLAB && !KMEMCHECK
4181da177e4SLinus Torvalds	help
4191da177e4SLinus Torvalds	  Say Y here to have the kernel do limited verification on memory
4201da177e4SLinus Torvalds	  allocation as well as poisoning memory on free to catch use of freed
4211da177e4SLinus Torvalds	  memory. This can make kmalloc/kfree-intensive workloads much slower.
4221da177e4SLinus Torvalds
423871751e2SAl Viroconfig DEBUG_SLAB_LEAK
424871751e2SAl Viro	bool "Memory leak debugging"
425871751e2SAl Viro	depends on DEBUG_SLAB
426871751e2SAl Viro
427f0630fffSChristoph Lameterconfig SLUB_DEBUG_ON
428f0630fffSChristoph Lameter	bool "SLUB debugging on by default"
4297d46d9e6SVegard Nossum	depends on SLUB && SLUB_DEBUG && !KMEMCHECK
430f0630fffSChristoph Lameter	default n
431f0630fffSChristoph Lameter	help
432f0630fffSChristoph Lameter	  Boot with debugging on by default. SLUB boots by default with
433f0630fffSChristoph Lameter	  the runtime debug capabilities switched off. Enabling this is
434f0630fffSChristoph Lameter	  equivalent to specifying the "slub_debug" parameter on boot.
435f0630fffSChristoph Lameter	  There is no support for more fine grained debug control like
436f0630fffSChristoph Lameter	  possible with slub_debug=xxx. SLUB debugging may be switched
437f0630fffSChristoph Lameter	  off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
438f0630fffSChristoph Lameter	  "slub_debug=-".
439f0630fffSChristoph Lameter
4408ff12cfcSChristoph Lameterconfig SLUB_STATS
4418ff12cfcSChristoph Lameter	default n
4428ff12cfcSChristoph Lameter	bool "Enable SLUB performance statistics"
443ab4d5ed5SChristoph Lameter	depends on SLUB && SYSFS
4448ff12cfcSChristoph Lameter	help
4458ff12cfcSChristoph Lameter	  SLUB statistics are useful to debug SLUBs allocation behavior in
4468ff12cfcSChristoph Lameter	  order find ways to optimize the allocator. This should never be
4478ff12cfcSChristoph Lameter	  enabled for production use since keeping statistics slows down
4488ff12cfcSChristoph Lameter	  the allocator by a few percentage points. The slabinfo command
4498ff12cfcSChristoph Lameter	  supports the determination of the most active slabs to figure
4508ff12cfcSChristoph Lameter	  out which slabs are relevant to a particular load.
4518ff12cfcSChristoph Lameter	  Try running: slabinfo -DA
4528ff12cfcSChristoph Lameter
453b69ec42bSCatalin Marinasconfig HAVE_DEBUG_KMEMLEAK
454b69ec42bSCatalin Marinas	bool
455b69ec42bSCatalin Marinas
4563bba00d7SCatalin Marinasconfig DEBUG_KMEMLEAK
4573bba00d7SCatalin Marinas	bool "Kernel memory leak detector"
458b69ec42bSCatalin Marinas	depends on DEBUG_KERNEL && EXPERIMENTAL && HAVE_DEBUG_KMEMLEAK
45979e0d9bdSCatalin Marinas	select DEBUG_FS
4603bba00d7SCatalin Marinas	select STACKTRACE if STACKTRACE_SUPPORT
4613bba00d7SCatalin Marinas	select KALLSYMS
462b60e26a2SRandy Dunlap	select CRC32
4633bba00d7SCatalin Marinas	help
4643bba00d7SCatalin Marinas	  Say Y here if you want to enable the memory leak
4653bba00d7SCatalin Marinas	  detector. The memory allocation/freeing is traced in a way
4663bba00d7SCatalin Marinas	  similar to the Boehm's conservative garbage collector, the
4673bba00d7SCatalin Marinas	  difference being that the orphan objects are not freed but
4683bba00d7SCatalin Marinas	  only shown in /sys/kernel/debug/kmemleak. Enabling this
4693bba00d7SCatalin Marinas	  feature will introduce an overhead to memory
4703bba00d7SCatalin Marinas	  allocations. See Documentation/kmemleak.txt for more
4713bba00d7SCatalin Marinas	  details.
4723bba00d7SCatalin Marinas
473bf96d1e3SCatalin Marinas	  Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
474bf96d1e3SCatalin Marinas	  of finding leaks due to the slab objects poisoning.
475bf96d1e3SCatalin Marinas
4763bba00d7SCatalin Marinas	  In order to access the kmemleak file, debugfs needs to be
4773bba00d7SCatalin Marinas	  mounted (usually at /sys/kernel/debug).
4783bba00d7SCatalin Marinas
479a9d9058aSCatalin Marinasconfig DEBUG_KMEMLEAK_EARLY_LOG_SIZE
480a9d9058aSCatalin Marinas	int "Maximum kmemleak early log entries"
481a9d9058aSCatalin Marinas	depends on DEBUG_KMEMLEAK
482dfcc3e6aSHeiko Carstens	range 200 40000
483a9d9058aSCatalin Marinas	default 400
484a9d9058aSCatalin Marinas	help
485a9d9058aSCatalin Marinas	  Kmemleak must track all the memory allocations to avoid
486a9d9058aSCatalin Marinas	  reporting false positives. Since memory may be allocated or
487a9d9058aSCatalin Marinas	  freed before kmemleak is initialised, an early log buffer is
488a9d9058aSCatalin Marinas	  used to store these actions. If kmemleak reports "early log
489a9d9058aSCatalin Marinas	  buffer exceeded", please increase this value.
490a9d9058aSCatalin Marinas
4910822ee4aSCatalin Marinasconfig DEBUG_KMEMLEAK_TEST
4920822ee4aSCatalin Marinas	tristate "Simple test for the kernel memory leak detector"
4939718269aSDaniel Baluta	depends on DEBUG_KMEMLEAK && m
4940822ee4aSCatalin Marinas	help
4959718269aSDaniel Baluta	  This option enables a module that explicitly leaks memory.
4960822ee4aSCatalin Marinas
4970822ee4aSCatalin Marinas	  If unsure, say N.
4980822ee4aSCatalin Marinas
499ab0155a2SJason Baronconfig DEBUG_KMEMLEAK_DEFAULT_OFF
500ab0155a2SJason Baron	bool "Default kmemleak to off"
501ab0155a2SJason Baron	depends on DEBUG_KMEMLEAK
502ab0155a2SJason Baron	help
503ab0155a2SJason Baron	  Say Y here to disable kmemleak by default. It can then be enabled
504ab0155a2SJason Baron	  on the command line via kmemleak=on.
505ab0155a2SJason Baron
5061da177e4SLinus Torvaldsconfig DEBUG_PREEMPT
5071da177e4SLinus Torvalds	bool "Debug preemptible kernel"
50801deab98SKumar Gala	depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
5091da177e4SLinus Torvalds	default y
5101da177e4SLinus Torvalds	help
5111da177e4SLinus Torvalds	  If you say Y here then the kernel will use a debug variant of the
5121da177e4SLinus Torvalds	  commonly used smp_processor_id() function and will print warnings
5131da177e4SLinus Torvalds	  if kernel code uses it in a preemption-unsafe way. Also, the kernel
5141da177e4SLinus Torvalds	  will detect preemption count underflows.
5151da177e4SLinus Torvalds
516e7eebaf6SIngo Molnarconfig DEBUG_RT_MUTEXES
517e7eebaf6SIngo Molnar	bool "RT Mutex debugging, deadlock detection"
518e7eebaf6SIngo Molnar	depends on DEBUG_KERNEL && RT_MUTEXES
519e7eebaf6SIngo Molnar	help
520e7eebaf6SIngo Molnar	 This allows rt mutex semantics violations and rt mutex related
521e7eebaf6SIngo Molnar	 deadlocks (lockups) to be detected and reported automatically.
522e7eebaf6SIngo Molnar
523e7eebaf6SIngo Molnarconfig DEBUG_PI_LIST
524e7eebaf6SIngo Molnar	bool
525e7eebaf6SIngo Molnar	default y
526e7eebaf6SIngo Molnar	depends on DEBUG_RT_MUTEXES
527e7eebaf6SIngo Molnar
52861a87122SThomas Gleixnerconfig RT_MUTEX_TESTER
52961a87122SThomas Gleixner	bool "Built-in scriptable tester for rt-mutexes"
530a1583d3eSRoman Zippel	depends on DEBUG_KERNEL && RT_MUTEXES
53161a87122SThomas Gleixner	help
53261a87122SThomas Gleixner	  This option enables a rt-mutex tester.
53361a87122SThomas Gleixner
5341da177e4SLinus Torvaldsconfig DEBUG_SPINLOCK
5354d9f34adSIngo Molnar	bool "Spinlock and rw-lock debugging: basic checks"
5361da177e4SLinus Torvalds	depends on DEBUG_KERNEL
537e335e3ebSRaghavendra K T	select UNINLINE_SPIN_UNLOCK
5381da177e4SLinus Torvalds	help
5391da177e4SLinus Torvalds	  Say Y here and build SMP to catch missing spinlock initialization
5401da177e4SLinus Torvalds	  and certain other kinds of spinlock errors commonly made.  This is
5411da177e4SLinus Torvalds	  best used in conjunction with the NMI watchdog so that spinlock
5421da177e4SLinus Torvalds	  deadlocks are also debuggable.
5431da177e4SLinus Torvalds
5444d9f34adSIngo Molnarconfig DEBUG_MUTEXES
5454d9f34adSIngo Molnar	bool "Mutex debugging: basic checks"
5464d9f34adSIngo Molnar	depends on DEBUG_KERNEL
5474d9f34adSIngo Molnar	help
5484d9f34adSIngo Molnar	 This feature allows mutex semantics violations to be detected and
5494d9f34adSIngo Molnar	 reported.
5504d9f34adSIngo Molnar
5514d9f34adSIngo Molnarconfig DEBUG_LOCK_ALLOC
5524d9f34adSIngo Molnar	bool "Lock debugging: detect incorrect freeing of live locks"
553517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
5544d9f34adSIngo Molnar	select DEBUG_SPINLOCK
5554d9f34adSIngo Molnar	select DEBUG_MUTEXES
5564d9f34adSIngo Molnar	select LOCKDEP
5574d9f34adSIngo Molnar	help
5584d9f34adSIngo Molnar	 This feature will check whether any held lock (spinlock, rwlock,
5594d9f34adSIngo Molnar	 mutex or rwsem) is incorrectly freed by the kernel, via any of the
5604d9f34adSIngo Molnar	 memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
5614d9f34adSIngo Molnar	 vfree(), etc.), whether a live lock is incorrectly reinitialized via
5624d9f34adSIngo Molnar	 spin_lock_init()/mutex_init()/etc., or whether there is any lock
5634d9f34adSIngo Molnar	 held during task exit.
5644d9f34adSIngo Molnar
5654d9f34adSIngo Molnarconfig PROVE_LOCKING
5664d9f34adSIngo Molnar	bool "Lock debugging: prove locking correctness"
567517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
5684d9f34adSIngo Molnar	select LOCKDEP
5694d9f34adSIngo Molnar	select DEBUG_SPINLOCK
5704d9f34adSIngo Molnar	select DEBUG_MUTEXES
5714d9f34adSIngo Molnar	select DEBUG_LOCK_ALLOC
57246b93b74SSteven Rostedt	select TRACE_IRQFLAGS
5734d9f34adSIngo Molnar	default n
5744d9f34adSIngo Molnar	help
5754d9f34adSIngo Molnar	 This feature enables the kernel to prove that all locking
5764d9f34adSIngo Molnar	 that occurs in the kernel runtime is mathematically
5774d9f34adSIngo Molnar	 correct: that under no circumstance could an arbitrary (and
5784d9f34adSIngo Molnar	 not yet triggered) combination of observed locking
5794d9f34adSIngo Molnar	 sequences (on an arbitrary number of CPUs, running an
5804d9f34adSIngo Molnar	 arbitrary number of tasks and interrupt contexts) cause a
5814d9f34adSIngo Molnar	 deadlock.
5824d9f34adSIngo Molnar
5834d9f34adSIngo Molnar	 In short, this feature enables the kernel to report locking
5844d9f34adSIngo Molnar	 related deadlocks before they actually occur.
5854d9f34adSIngo Molnar
5864d9f34adSIngo Molnar	 The proof does not depend on how hard and complex a
5874d9f34adSIngo Molnar	 deadlock scenario would be to trigger: how many
5884d9f34adSIngo Molnar	 participant CPUs, tasks and irq-contexts would be needed
5894d9f34adSIngo Molnar	 for it to trigger. The proof also does not depend on
5904d9f34adSIngo Molnar	 timing: if a race and a resulting deadlock is possible
5914d9f34adSIngo Molnar	 theoretically (no matter how unlikely the race scenario
5924d9f34adSIngo Molnar	 is), it will be proven so and will immediately be
5934d9f34adSIngo Molnar	 reported by the kernel (once the event is observed that
5944d9f34adSIngo Molnar	 makes the deadlock theoretically possible).
5954d9f34adSIngo Molnar
5964d9f34adSIngo Molnar	 If a deadlock is impossible (i.e. the locking rules, as
5974d9f34adSIngo Molnar	 observed by the kernel, are mathematically correct), the
5984d9f34adSIngo Molnar	 kernel reports nothing.
5994d9f34adSIngo Molnar
6004d9f34adSIngo Molnar	 NOTE: this feature can also be enabled for rwlocks, mutexes
6014d9f34adSIngo Molnar	 and rwsems - in which case all dependencies between these
6024d9f34adSIngo Molnar	 different locking variants are observed and mapped too, and
6034d9f34adSIngo Molnar	 the proof of observed correctness is also maintained for an
6044d9f34adSIngo Molnar	 arbitrary combination of these separate locking variants.
6054d9f34adSIngo Molnar
6064d9f34adSIngo Molnar	 For more details, see Documentation/lockdep-design.txt.
6074d9f34adSIngo Molnar
608632ee200SPaul E. McKenneyconfig PROVE_RCU
609632ee200SPaul E. McKenney	bool "RCU debugging: prove RCU correctness"
610632ee200SPaul E. McKenney	depends on PROVE_LOCKING
611632ee200SPaul E. McKenney	default n
612632ee200SPaul E. McKenney	help
613632ee200SPaul E. McKenney	 This feature enables lockdep extensions that check for correct
614632ee200SPaul E. McKenney	 use of RCU APIs.  This is currently under development.  Say Y
615632ee200SPaul E. McKenney	 if you want to debug RCU usage or help work on the PROVE_RCU
616632ee200SPaul E. McKenney	 feature.
617632ee200SPaul E. McKenney
618632ee200SPaul E. McKenney	 Say N if you are unsure.
619632ee200SPaul E. McKenney
6202b3fc35fSLai Jiangshanconfig PROVE_RCU_REPEATEDLY
6212b3fc35fSLai Jiangshan	bool "RCU debugging: don't disable PROVE_RCU on first splat"
6222b3fc35fSLai Jiangshan	depends on PROVE_RCU
6232b3fc35fSLai Jiangshan	default n
6242b3fc35fSLai Jiangshan	help
6252b3fc35fSLai Jiangshan	 By itself, PROVE_RCU will disable checking upon issuing the
6262b3fc35fSLai Jiangshan	 first warning (or "splat").  This feature prevents such
6272b3fc35fSLai Jiangshan	 disabling, allowing multiple RCU-lockdep warnings to be printed
6282b3fc35fSLai Jiangshan	 on a single reboot.
6292b3fc35fSLai Jiangshan
6302dfbf4dfSPaul E. McKenney	 Say Y to allow multiple RCU-lockdep warnings per boot.
6312dfbf4dfSPaul E. McKenney
6322dfbf4dfSPaul E. McKenney	 Say N if you are unsure.
6332dfbf4dfSPaul E. McKenney
634e3ebfb96SPaul E. McKenneyconfig PROVE_RCU_DELAY
635e3ebfb96SPaul E. McKenney	bool "RCU debugging: preemptible RCU race provocation"
636e3ebfb96SPaul E. McKenney	depends on DEBUG_KERNEL && PREEMPT_RCU
637e3ebfb96SPaul E. McKenney	default n
638e3ebfb96SPaul E. McKenney	help
639e3ebfb96SPaul E. McKenney	 There is a class of races that involve an unlikely preemption
640e3ebfb96SPaul E. McKenney	 of __rcu_read_unlock() just after ->rcu_read_lock_nesting has
641e3ebfb96SPaul E. McKenney	 been set to INT_MIN.  This feature inserts a delay at that
642e3ebfb96SPaul E. McKenney	 point to increase the probability of these races.
643e3ebfb96SPaul E. McKenney
644e3ebfb96SPaul E. McKenney	 Say Y to increase probability of preemption of __rcu_read_unlock().
645e3ebfb96SPaul E. McKenney
646e3ebfb96SPaul E. McKenney	 Say N if you are unsure.
647e3ebfb96SPaul E. McKenney
648ca5ecddfSPaul E. McKenneyconfig SPARSE_RCU_POINTER
649ca5ecddfSPaul E. McKenney	bool "RCU debugging: sparse-based checks for pointer usage"
650ca5ecddfSPaul E. McKenney	default n
651ca5ecddfSPaul E. McKenney	help
652ca5ecddfSPaul E. McKenney	 This feature enables the __rcu sparse annotation for
653ca5ecddfSPaul E. McKenney	 RCU-protected pointers.  This annotation will cause sparse
654ca5ecddfSPaul E. McKenney	 to flag any non-RCU used of annotated pointers.  This can be
655ca5ecddfSPaul E. McKenney	 helpful when debugging RCU usage.  Please note that this feature
656ca5ecddfSPaul E. McKenney	 is not intended to enforce code cleanliness; it is instead merely
657ca5ecddfSPaul E. McKenney	 a debugging aid.
658ca5ecddfSPaul E. McKenney
659ca5ecddfSPaul E. McKenney	 Say Y to make sparse flag questionable use of RCU-protected pointers
660ca5ecddfSPaul E. McKenney
6612b3fc35fSLai Jiangshan	 Say N if you are unsure.
6622b3fc35fSLai Jiangshan
6634d9f34adSIngo Molnarconfig LOCKDEP
6644d9f34adSIngo Molnar	bool
665517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
6664d9f34adSIngo Molnar	select STACKTRACE
66779aac889SMichal Simek	select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE
6684d9f34adSIngo Molnar	select KALLSYMS
6694d9f34adSIngo Molnar	select KALLSYMS_ALL
6704d9f34adSIngo Molnar
671f20786ffSPeter Zijlstraconfig LOCK_STAT
672fdfb870fSDanny ter Haar	bool "Lock usage statistics"
673f20786ffSPeter Zijlstra	depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
674f20786ffSPeter Zijlstra	select LOCKDEP
675f20786ffSPeter Zijlstra	select DEBUG_SPINLOCK
676f20786ffSPeter Zijlstra	select DEBUG_MUTEXES
677f20786ffSPeter Zijlstra	select DEBUG_LOCK_ALLOC
678f20786ffSPeter Zijlstra	default n
679f20786ffSPeter Zijlstra	help
680f20786ffSPeter Zijlstra	 This feature enables tracking lock contention points
681f20786ffSPeter Zijlstra
682a560aa48SPeter Zijlstra	 For more details, see Documentation/lockstat.txt
683a560aa48SPeter Zijlstra
684dd8b1cf6SFrederic Weisbecker	 This also enables lock events required by "perf lock",
685dd8b1cf6SFrederic Weisbecker	 subcommand of perf.
686dd8b1cf6SFrederic Weisbecker	 If you want to use "perf lock", you also need to turn on
687dd8b1cf6SFrederic Weisbecker	 CONFIG_EVENT_TRACING.
68884c6f88fSHitoshi Mitake
68984c6f88fSHitoshi Mitake	 CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
69084c6f88fSHitoshi Mitake	 (CONFIG_LOCKDEP defines "acquire" and "release" events.)
69184c6f88fSHitoshi Mitake
6924d9f34adSIngo Molnarconfig DEBUG_LOCKDEP
6934d9f34adSIngo Molnar	bool "Lock dependency engine debugging"
694517e7aa5SAdrian Bunk	depends on DEBUG_KERNEL && LOCKDEP
6954d9f34adSIngo Molnar	help
6964d9f34adSIngo Molnar	  If you say Y here, the lock dependency engine will do
6974d9f34adSIngo Molnar	  additional runtime checks to debug itself, at the price
6984d9f34adSIngo Molnar	  of more runtime overhead.
6994d9f34adSIngo Molnar
7004d9f34adSIngo Molnarconfig TRACE_IRQFLAGS
7014d9f34adSIngo Molnar	bool
70246b93b74SSteven Rostedt	help
70346b93b74SSteven Rostedt	  Enables hooks to interrupt enabling and disabling for
70446b93b74SSteven Rostedt	  either tracing or lock debugging.
7054d9f34adSIngo Molnar
706d902db1eSFrederic Weisbeckerconfig DEBUG_ATOMIC_SLEEP
707d902db1eSFrederic Weisbecker	bool "Sleep inside atomic section checking"
708e8f7c70fSFrederic Weisbecker	select PREEMPT_COUNT
7091da177e4SLinus Torvalds	depends on DEBUG_KERNEL
7101da177e4SLinus Torvalds	help
7111da177e4SLinus Torvalds	  If you say Y here, various routines which may sleep will become very
712d902db1eSFrederic Weisbecker	  noisy if they are called inside atomic sections: when a spinlock is
713d902db1eSFrederic Weisbecker	  held, inside an rcu read side critical section, inside preempt disabled
714d902db1eSFrederic Weisbecker	  sections, inside an interrupt, etc...
7151da177e4SLinus Torvalds
716cae2ed9aSIngo Molnarconfig DEBUG_LOCKING_API_SELFTESTS
717cae2ed9aSIngo Molnar	bool "Locking API boot-time self-tests"
718cae2ed9aSIngo Molnar	depends on DEBUG_KERNEL
719cae2ed9aSIngo Molnar	help
720cae2ed9aSIngo Molnar	  Say Y here if you want the kernel to run a short self-test during
721cae2ed9aSIngo Molnar	  bootup. The self-test checks whether common types of locking bugs
722cae2ed9aSIngo Molnar	  are detected by debugging mechanisms or not. (if you disable
723cae2ed9aSIngo Molnar	  lock debugging then those bugs wont be detected of course.)
724cae2ed9aSIngo Molnar	  The following locking APIs are covered: spinlocks, rwlocks,
725cae2ed9aSIngo Molnar	  mutexes and rwsems.
726cae2ed9aSIngo Molnar
7278637c099SIngo Molnarconfig STACKTRACE
7288637c099SIngo Molnar	bool
7298637c099SIngo Molnar	depends on STACKTRACE_SUPPORT
7308637c099SIngo Molnar
7315ca43f6cSStephen Boydconfig DEBUG_STACK_USAGE
7325ca43f6cSStephen Boyd	bool "Stack utilization instrumentation"
733e9c31b32STony Luck	depends on DEBUG_KERNEL && !IA64 && !PARISC
7345ca43f6cSStephen Boyd	help
7355ca43f6cSStephen Boyd	  Enables the display of the minimum amount of free stack which each
7365ca43f6cSStephen Boyd	  task has ever had available in the sysrq-T and sysrq-P debug output.
7375ca43f6cSStephen Boyd
7385ca43f6cSStephen Boyd	  This option will slow down process creation somewhat.
7395ca43f6cSStephen Boyd
7401da177e4SLinus Torvaldsconfig DEBUG_KOBJECT
7411da177e4SLinus Torvalds	bool "kobject debugging"
7421da177e4SLinus Torvalds	depends on DEBUG_KERNEL
7431da177e4SLinus Torvalds	help
7441da177e4SLinus Torvalds	  If you say Y here, some extra kobject debugging messages will be sent
7451da177e4SLinus Torvalds	  to the syslog.
7461da177e4SLinus Torvalds
7471da177e4SLinus Torvaldsconfig DEBUG_HIGHMEM
7481da177e4SLinus Torvalds	bool "Highmem debugging"
7491da177e4SLinus Torvalds	depends on DEBUG_KERNEL && HIGHMEM
7501da177e4SLinus Torvalds	help
7511da177e4SLinus Torvalds	  This options enables addition error checking for high memory systems.
7521da177e4SLinus Torvalds	  Disable for production systems.
7531da177e4SLinus Torvalds
754*9b2a60c4SCatalin Marinasconfig HAVE_DEBUG_BUGVERBOSE
755*9b2a60c4SCatalin Marinas	bool
756*9b2a60c4SCatalin Marinas
7571da177e4SLinus Torvaldsconfig DEBUG_BUGVERBOSE
7586a108a14SDavid Rientjes	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT
759*9b2a60c4SCatalin Marinas	depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE)
7608420e7efSAlexey Dobriyan	default y
7611da177e4SLinus Torvalds	help
7621da177e4SLinus Torvalds	  Say Y here to make BUG() panics output the file name and line number
7631da177e4SLinus Torvalds	  of the BUG call as well as the EIP and oops trace.  This aids
7641da177e4SLinus Torvalds	  debugging but costs about 70-100K of memory.
7651da177e4SLinus Torvalds
7661da177e4SLinus Torvaldsconfig DEBUG_INFO
7671da177e4SLinus Torvalds	bool "Compile the kernel with debug info"
7681da177e4SLinus Torvalds	depends on DEBUG_KERNEL
7691da177e4SLinus Torvalds	help
7701da177e4SLinus Torvalds          If you say Y here the resulting kernel image will include
7711da177e4SLinus Torvalds	  debugging info resulting in a larger kernel image.
772b72e53f8SAndreas Dilger	  This adds debug symbols to the kernel and modules (gcc -g), and
773b72e53f8SAndreas Dilger	  is needed if you intend to use kernel crashdump or binary object
774b72e53f8SAndreas Dilger	  tools like crash, kgdb, LKCD, gdb, etc on the kernel.
7751da177e4SLinus Torvalds	  Say Y here only if you plan to debug the kernel.
7761da177e4SLinus Torvalds
7771da177e4SLinus Torvalds	  If unsure, say N.
7781da177e4SLinus Torvalds
779d6f4ceb7SAndi Kleenconfig DEBUG_INFO_REDUCED
780d6f4ceb7SAndi Kleen	bool "Reduce debugging information"
781d6f4ceb7SAndi Kleen	depends on DEBUG_INFO
782d6f4ceb7SAndi Kleen	help
783d6f4ceb7SAndi Kleen	  If you say Y here gcc is instructed to generate less debugging
784d6f4ceb7SAndi Kleen	  information for structure types. This means that tools that
785d6f4ceb7SAndi Kleen	  need full debugging information (like kgdb or systemtap) won't
786d6f4ceb7SAndi Kleen	  be happy. But if you merely need debugging information to
787d6f4ceb7SAndi Kleen	  resolve line numbers there is no loss. Advantage is that
788d6f4ceb7SAndi Kleen	  build directory object sizes shrink dramatically over a full
789d6f4ceb7SAndi Kleen	  DEBUG_INFO build and compile times are reduced too.
790d6f4ceb7SAndi Kleen	  Only works with newer gcc versions.
791d6f4ceb7SAndi Kleen
792a241ec65SPaul E. McKenneyconfig DEBUG_VM
793a241ec65SPaul E. McKenney	bool "Debug VM"
794a241ec65SPaul E. McKenney	depends on DEBUG_KERNEL
795a241ec65SPaul E. McKenney	help
79613e7444bSNick Piggin	  Enable this to turn on extended checks in the virtual-memory system
79713e7444bSNick Piggin          that may impact performance.
798a241ec65SPaul E. McKenney
799a241ec65SPaul E. McKenney	  If unsure, say N.
800a241ec65SPaul E. McKenney
80159ea7463SJiri Slabyconfig DEBUG_VIRTUAL
80259ea7463SJiri Slaby	bool "Debug VM translations"
80359ea7463SJiri Slaby	depends on DEBUG_KERNEL && X86
80459ea7463SJiri Slaby	help
80559ea7463SJiri Slaby	  Enable some costly sanity checks in virtual to page code. This can
80659ea7463SJiri Slaby	  catch mistakes with virt_to_page() and friends.
80759ea7463SJiri Slaby
80859ea7463SJiri Slaby	  If unsure, say N.
80959ea7463SJiri Slaby
8108feae131SDavid Howellsconfig DEBUG_NOMMU_REGIONS
8118feae131SDavid Howells	bool "Debug the global anon/private NOMMU mapping region tree"
8128feae131SDavid Howells	depends on DEBUG_KERNEL && !MMU
8138feae131SDavid Howells	help
8148feae131SDavid Howells	  This option causes the global tree of anonymous and private mapping
8158feae131SDavid Howells	  regions to be regularly checked for invalid topology.
8168feae131SDavid Howells
817ad775f5aSDave Hansenconfig DEBUG_WRITECOUNT
818ad775f5aSDave Hansen	bool "Debug filesystem writers count"
819ad775f5aSDave Hansen	depends on DEBUG_KERNEL
820ad775f5aSDave Hansen	help
821ad775f5aSDave Hansen	  Enable this to catch wrong use of the writers count in struct
822ad775f5aSDave Hansen	  vfsmount.  This will increase the size of each file struct by
823ad775f5aSDave Hansen	  32 bits.
824ad775f5aSDave Hansen
825ad775f5aSDave Hansen	  If unsure, say N.
826ad775f5aSDave Hansen
8276b74ab97SMel Gormanconfig DEBUG_MEMORY_INIT
8286a108a14SDavid Rientjes	bool "Debug memory initialisation" if EXPERT
8296a108a14SDavid Rientjes	default !EXPERT
8306b74ab97SMel Gorman	help
8316b74ab97SMel Gorman	  Enable this for additional checks during memory initialisation.
8326b74ab97SMel Gorman	  The sanity checks verify aspects of the VM such as the memory model
8336b74ab97SMel Gorman	  and other information provided by the architecture. Verbose
8346b74ab97SMel Gorman	  information will be printed at KERN_DEBUG loglevel depending
8356b74ab97SMel Gorman	  on the mminit_loglevel= command-line option.
8366b74ab97SMel Gorman
8376b74ab97SMel Gorman	  If unsure, say Y
8386b74ab97SMel Gorman
839199a9afcSDave Jonesconfig DEBUG_LIST
840199a9afcSDave Jones	bool "Debug linked list manipulation"
841199a9afcSDave Jones	depends on DEBUG_KERNEL
842199a9afcSDave Jones	help
843199a9afcSDave Jones	  Enable this to turn on extended checks in the linked-list
844199a9afcSDave Jones	  walking routines.
845199a9afcSDave Jones
846199a9afcSDave Jones	  If unsure, say N.
847199a9afcSDave Jones
8486d411e6cSArtem Bityutskiyconfig TEST_LIST_SORT
8496d411e6cSArtem Bityutskiy	bool "Linked list sorting test"
8506d411e6cSArtem Bityutskiy	depends on DEBUG_KERNEL
8516d411e6cSArtem Bityutskiy	help
8526d411e6cSArtem Bityutskiy	  Enable this to turn on 'list_sort()' function test. This test is
8536d411e6cSArtem Bityutskiy	  executed only once during system boot, so affects only boot time.
8546d411e6cSArtem Bityutskiy
8556d411e6cSArtem Bityutskiy	  If unsure, say N.
8566d411e6cSArtem Bityutskiy
857d6ec0842SJens Axboeconfig DEBUG_SG
858d6ec0842SJens Axboe	bool "Debug SG table operations"
859d6ec0842SJens Axboe	depends on DEBUG_KERNEL
860d6ec0842SJens Axboe	help
861d6ec0842SJens Axboe	  Enable this to turn on checks on scatter-gather tables. This can
862d6ec0842SJens Axboe	  help find problems with drivers that do not properly initialize
863d6ec0842SJens Axboe	  their sg tables.
864d6ec0842SJens Axboe
865d6ec0842SJens Axboe	  If unsure, say N.
866d6ec0842SJens Axboe
8671b2439dbSArjan van de Venconfig DEBUG_NOTIFIERS
8681b2439dbSArjan van de Ven	bool "Debug notifier call chains"
8691b2439dbSArjan van de Ven	depends on DEBUG_KERNEL
8701b2439dbSArjan van de Ven	help
8711b2439dbSArjan van de Ven	  Enable this to turn on sanity checking for notifier call chains.
8721b2439dbSArjan van de Ven	  This is most useful for kernel developers to make sure that
8731b2439dbSArjan van de Ven	  modules properly unregister themselves from notifier chains.
8741b2439dbSArjan van de Ven	  This is a relatively cheap check but if you care about maximum
8751b2439dbSArjan van de Ven	  performance, say N.
8761b2439dbSArjan van de Ven
877e0e81739SDavid Howellsconfig DEBUG_CREDENTIALS
878e0e81739SDavid Howells	bool "Debug credential management"
879e0e81739SDavid Howells	depends on DEBUG_KERNEL
880e0e81739SDavid Howells	help
881e0e81739SDavid Howells	  Enable this to turn on some debug checking for credential
882e0e81739SDavid Howells	  management.  The additional code keeps track of the number of
883e0e81739SDavid Howells	  pointers from task_structs to any given cred struct, and checks to
884e0e81739SDavid Howells	  see that this number never exceeds the usage count of the cred
885e0e81739SDavid Howells	  struct.
886e0e81739SDavid Howells
887e0e81739SDavid Howells	  Furthermore, if SELinux is enabled, this also checks that the
888e0e81739SDavid Howells	  security pointer in the cred struct is never seen to be invalid.
889e0e81739SDavid Howells
890e0e81739SDavid Howells	  If unsure, say N.
891e0e81739SDavid Howells
89264dec40dSJeff Mahoney#
89364dec40dSJeff Mahoney# Select this config option from the architecture Kconfig, if it
89452288b66SJustin P. Mattock# is preferred to always offer frame pointers as a config
89564dec40dSJeff Mahoney# option on the architecture (regardless of KERNEL_DEBUG):
89664dec40dSJeff Mahoney#
89764dec40dSJeff Mahoneyconfig ARCH_WANT_FRAME_POINTERS
89864dec40dSJeff Mahoney	bool
89964dec40dSJeff Mahoney	help
90064dec40dSJeff Mahoney
9011da177e4SLinus Torvaldsconfig FRAME_POINTER
9021da177e4SLinus Torvalds	bool "Compile the kernel with frame pointers"
903b920de1bSDavid Howells	depends on DEBUG_KERNEL && \
90473020415SGeert Uytterhoeven		(CRIS || M68K || FRV || UML || \
905da4276b8SIngo Molnar		 AVR32 || SUPERH || BLACKFIN || MN10300) || \
906da4276b8SIngo Molnar		ARCH_WANT_FRAME_POINTERS
907da4276b8SIngo Molnar	default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
9081da177e4SLinus Torvalds	help
909da4276b8SIngo Molnar	  If you say Y here the resulting kernel image will be slightly
910da4276b8SIngo Molnar	  larger and slower, but it gives very useful debugging information
911da4276b8SIngo Molnar	  in case of kernel bugs. (precise oopses/stacktraces/warnings)
9121da177e4SLinus Torvalds
913bfe8df3dSRandy Dunlapconfig BOOT_PRINTK_DELAY
914bfe8df3dSRandy Dunlap	bool "Delay each boot printk message by N milliseconds"
915bfe8df3dSRandy Dunlap	depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
916bfe8df3dSRandy Dunlap	help
917bfe8df3dSRandy Dunlap	  This build option allows you to read kernel boot messages
918bfe8df3dSRandy Dunlap	  by inserting a short delay after each one.  The delay is
919bfe8df3dSRandy Dunlap	  specified in milliseconds on the kernel command line,
920bfe8df3dSRandy Dunlap	  using "boot_delay=N".
921bfe8df3dSRandy Dunlap
922bfe8df3dSRandy Dunlap	  It is likely that you would also need to use "lpj=M" to preset
923bfe8df3dSRandy Dunlap	  the "loops per jiffie" value.
924bfe8df3dSRandy Dunlap	  See a previous boot log for the "lpj" value to use for your
925bfe8df3dSRandy Dunlap	  system, and then set "lpj=M" before setting "boot_delay=N".
926bfe8df3dSRandy Dunlap	  NOTE:  Using this option may adversely affect SMP systems.
927bfe8df3dSRandy Dunlap	  I.e., processors other than the first one may not boot up.
9288edbb83eSAnton Blanchard	  BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect
929bfe8df3dSRandy Dunlap	  what it believes to be lockup conditions.
930bfe8df3dSRandy Dunlap
931a241ec65SPaul E. McKenneyconfig RCU_TORTURE_TEST
932a241ec65SPaul E. McKenney	tristate "torture tests for RCU"
933a241ec65SPaul E. McKenney	depends on DEBUG_KERNEL
934a241ec65SPaul E. McKenney	default n
935a241ec65SPaul E. McKenney	help
936a241ec65SPaul E. McKenney	  This option provides a kernel module that runs torture tests
937a241ec65SPaul E. McKenney	  on the RCU infrastructure.  The kernel module may be built
938a241ec65SPaul E. McKenney	  after the fact on the running kernel to be tested, if desired.
939a241ec65SPaul E. McKenney
94031a72bceSPaul E. McKenney	  Say Y here if you want RCU torture tests to be built into
94131a72bceSPaul E. McKenney	  the kernel.
942a241ec65SPaul E. McKenney	  Say M if you want the RCU torture tests to build as a module.
943a241ec65SPaul E. McKenney	  Say N if you are unsure.
9448bb31b9dSAnkita Garg
94531a72bceSPaul E. McKenneyconfig RCU_TORTURE_TEST_RUNNABLE
94631a72bceSPaul E. McKenney	bool "torture tests for RCU runnable by default"
94731a72bceSPaul E. McKenney	depends on RCU_TORTURE_TEST = y
94831a72bceSPaul E. McKenney	default n
94931a72bceSPaul E. McKenney	help
95031a72bceSPaul E. McKenney	  This option provides a way to build the RCU torture tests
95131a72bceSPaul E. McKenney	  directly into the kernel without them starting up at boot
95231a72bceSPaul E. McKenney	  time.  You can use /proc/sys/kernel/rcutorture_runnable
95331a72bceSPaul E. McKenney	  to manually override this setting.  This /proc file is
95431a72bceSPaul E. McKenney	  available only when the RCU torture tests have been built
95531a72bceSPaul E. McKenney	  into the kernel.
95631a72bceSPaul E. McKenney
95731a72bceSPaul E. McKenney	  Say Y here if you want the RCU torture tests to start during
95831a72bceSPaul E. McKenney	  boot (you probably don't).
95931a72bceSPaul E. McKenney	  Say N here if you want the RCU torture tests to start only
96031a72bceSPaul E. McKenney	  after being manually enabled via /proc.
96131a72bceSPaul E. McKenney
962b163760eSPaul E. McKenneyconfig RCU_CPU_STALL_TIMEOUT
963b163760eSPaul E. McKenney	int "RCU CPU stall timeout in seconds"
964a00e0d71SPaul E. McKenney	depends on TREE_RCU || TREE_PREEMPT_RCU
965b163760eSPaul E. McKenney	range 3 300
966b163760eSPaul E. McKenney	default 60
967b163760eSPaul E. McKenney	help
968b163760eSPaul E. McKenney	  If a given RCU grace period extends more than the specified
969b163760eSPaul E. McKenney	  number of seconds, a CPU stall warning is printed.  If the
970b163760eSPaul E. McKenney	  RCU grace period persists, additional CPU stall warnings are
971b163760eSPaul E. McKenney	  printed at more widely spaced intervals.
972b163760eSPaul E. McKenney
9731ed509a2SPaul E. McKenneyconfig RCU_CPU_STALL_VERBOSE
9741ed509a2SPaul E. McKenney	bool "Print additional per-task information for RCU_CPU_STALL_DETECTOR"
975a00e0d71SPaul E. McKenney	depends on TREE_PREEMPT_RCU
97655ec936fSPaul E. McKenney	default y
9771ed509a2SPaul E. McKenney	help
9781ed509a2SPaul E. McKenney	  This option causes RCU to printk detailed per-task information
9791ed509a2SPaul E. McKenney	  for any tasks that are stalling the current RCU grace period.
98064db4cffSPaul E. McKenney
98164db4cffSPaul E. McKenney	  Say N if you are unsure.
98264db4cffSPaul E. McKenney
9831ed509a2SPaul E. McKenney	  Say Y if you want to enable such checks.
9841ed509a2SPaul E. McKenney
985a858af28SPaul E. McKenneyconfig RCU_CPU_STALL_INFO
986a858af28SPaul E. McKenney	bool "Print additional diagnostics on RCU CPU stall"
987a858af28SPaul E. McKenney	depends on (TREE_RCU || TREE_PREEMPT_RCU) && DEBUG_KERNEL
988a858af28SPaul E. McKenney	default n
989a858af28SPaul E. McKenney	help
990a858af28SPaul E. McKenney	  For each stalled CPU that is aware of the current RCU grace
991a858af28SPaul E. McKenney	  period, print out additional per-CPU diagnostic information
992a858af28SPaul E. McKenney	  regarding scheduling-clock ticks, idle state, and,
993a858af28SPaul E. McKenney	  for RCU_FAST_NO_HZ kernels, idle-entry state.
994a858af28SPaul E. McKenney
995a858af28SPaul E. McKenney	  Say N if you are unsure.
996a858af28SPaul E. McKenney
997a858af28SPaul E. McKenney	  Say Y if you want to enable such diagnostics.
998a858af28SPaul E. McKenney
9995c8806a0SPaul E. McKenneyconfig RCU_TRACE
10005c8806a0SPaul E. McKenney	bool "Enable tracing for RCU"
10015c8806a0SPaul E. McKenney	depends on DEBUG_KERNEL
10025c8806a0SPaul E. McKenney	help
10035c8806a0SPaul E. McKenney	  This option provides tracing in RCU which presents stats
10045c8806a0SPaul E. McKenney	  in debugfs for debugging RCU implementation.
10055c8806a0SPaul E. McKenney
10065c8806a0SPaul E. McKenney	  Say Y here if you want to enable RCU tracing
10075c8806a0SPaul E. McKenney	  Say N if you are unsure.
10085c8806a0SPaul E. McKenney
10098c1c9356SAnanth N Mavinakayanahalliconfig KPROBES_SANITY_TEST
10108c1c9356SAnanth N Mavinakayanahalli	bool "Kprobes sanity tests"
10118c1c9356SAnanth N Mavinakayanahalli	depends on DEBUG_KERNEL
10128c1c9356SAnanth N Mavinakayanahalli	depends on KPROBES
10138c1c9356SAnanth N Mavinakayanahalli	default n
10148c1c9356SAnanth N Mavinakayanahalli	help
10158c1c9356SAnanth N Mavinakayanahalli	  This option provides for testing basic kprobes functionality on
10168c1c9356SAnanth N Mavinakayanahalli	  boot. A sample kprobe, jprobe and kretprobe are inserted and
10178c1c9356SAnanth N Mavinakayanahalli	  verified for functionality.
10188c1c9356SAnanth N Mavinakayanahalli
10198c1c9356SAnanth N Mavinakayanahalli	  Say N if you are unsure.
10208c1c9356SAnanth N Mavinakayanahalli
10216dab2778SArjan van de Venconfig BACKTRACE_SELF_TEST
10226dab2778SArjan van de Ven	tristate "Self test for the backtrace code"
10236dab2778SArjan van de Ven	depends on DEBUG_KERNEL
10246dab2778SArjan van de Ven	default n
10256dab2778SArjan van de Ven	help
10266dab2778SArjan van de Ven	  This option provides a kernel module that can be used to test
10276dab2778SArjan van de Ven	  the kernel stack backtrace code. This option is not useful
10286dab2778SArjan van de Ven	  for distributions or general kernels, but only for kernel
10296dab2778SArjan van de Ven	  developers working on architecture code.
10306dab2778SArjan van de Ven
1031ad118c54SVegard Nossum	  Note that if you want to also test saved backtraces, you will
1032ad118c54SVegard Nossum	  have to enable STACKTRACE as well.
1033ad118c54SVegard Nossum
10346dab2778SArjan van de Ven	  Say N if you are unsure.
10356dab2778SArjan van de Ven
1036870d6656STejun Heoconfig DEBUG_BLOCK_EXT_DEVT
1037870d6656STejun Heo        bool "Force extended block device numbers and spread them"
1038870d6656STejun Heo	depends on DEBUG_KERNEL
1039870d6656STejun Heo	depends on BLOCK
1040759f8ca3SJens Axboe	default n
1041870d6656STejun Heo	help
10420e11e342STejun Heo	  BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
10430e11e342STejun Heo	  SOME DISTRIBUTIONS.  DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
10440e11e342STejun Heo	  YOU ARE DOING.  Distros, please enable this and fix whatever
10450e11e342STejun Heo	  is broken.
10460e11e342STejun Heo
1047870d6656STejun Heo	  Conventionally, block device numbers are allocated from
1048870d6656STejun Heo	  predetermined contiguous area.  However, extended block area
1049870d6656STejun Heo	  may introduce non-contiguous block device numbers.  This
1050870d6656STejun Heo	  option forces most block device numbers to be allocated from
1051870d6656STejun Heo	  the extended space and spreads them to discover kernel or
1052870d6656STejun Heo	  userland code paths which assume predetermined contiguous
1053870d6656STejun Heo	  device number allocation.
1054870d6656STejun Heo
105555dc7db7STejun Heo	  Note that turning on this debug option shuffles all the
105655dc7db7STejun Heo	  device numbers for all IDE and SCSI devices including libata
105755dc7db7STejun Heo	  ones, so root partition specified using device number
105855dc7db7STejun Heo	  directly (via rdev or root=MAJ:MIN) won't work anymore.
105955dc7db7STejun Heo	  Textual device names (root=/dev/sdXn) will continue to work.
106055dc7db7STejun Heo
1061870d6656STejun Heo	  Say N if you are unsure.
1062870d6656STejun Heo
10637c756e6eSTejun Heoconfig DEBUG_FORCE_WEAK_PER_CPU
10647c756e6eSTejun Heo	bool "Force weak per-cpu definitions"
10657c756e6eSTejun Heo	depends on DEBUG_KERNEL
10667c756e6eSTejun Heo	help
10677c756e6eSTejun Heo	  s390 and alpha require percpu variables in modules to be
10687c756e6eSTejun Heo	  defined weak to work around addressing range issue which
10697c756e6eSTejun Heo	  puts the following two restrictions on percpu variable
10707c756e6eSTejun Heo	  definitions.
10717c756e6eSTejun Heo
10727c756e6eSTejun Heo	  1. percpu symbols must be unique whether static or not
10737c756e6eSTejun Heo	  2. percpu variables can't be defined inside a function
10747c756e6eSTejun Heo
10757c756e6eSTejun Heo	  To ensure that generic code follows the above rules, this
10767c756e6eSTejun Heo	  option forces all percpu variables to be defined as weak.
10777c756e6eSTejun Heo
107844ec7abeSStephen Boydconfig DEBUG_PER_CPU_MAPS
107944ec7abeSStephen Boyd	bool "Debug access to per_cpu maps"
108044ec7abeSStephen Boyd	depends on DEBUG_KERNEL
108144ec7abeSStephen Boyd	depends on SMP
108244ec7abeSStephen Boyd	help
108344ec7abeSStephen Boyd	  Say Y to verify that the per_cpu map being accessed has
108444ec7abeSStephen Boyd	  been set up. This adds a fair amount of code to kernel memory
108544ec7abeSStephen Boyd	  and decreases performance.
108644ec7abeSStephen Boyd
108744ec7abeSStephen Boyd	  Say N if unsure.
108844ec7abeSStephen Boyd
10898bb31b9dSAnkita Gargconfig LKDTM
10908bb31b9dSAnkita Garg	tristate "Linux Kernel Dump Test Tool Module"
10910347af4eSSimon Kagstrom	depends on DEBUG_FS
1092fddd9cf8SChris Snook	depends on BLOCK
10938bb31b9dSAnkita Garg	default n
10948bb31b9dSAnkita Garg	help
10958bb31b9dSAnkita Garg	This module enables testing of the different dumping mechanisms by
10968bb31b9dSAnkita Garg	inducing system failures at predefined crash points.
10978bb31b9dSAnkita Garg	If you don't need it: say N
10988bb31b9dSAnkita Garg	Choose M here to compile this code as a module. The module will be
10998bb31b9dSAnkita Garg	called lkdtm.
11008bb31b9dSAnkita Garg
11018bb31b9dSAnkita Garg	Documentation on how to use the module can be found in
11020347af4eSSimon Kagstrom	Documentation/fault-injection/provoke-crashes.txt
11036ff1cb35SAkinobu Mita
11048d438288SAkinobu Mitaconfig NOTIFIER_ERROR_INJECTION
11058d438288SAkinobu Mita	tristate "Notifier error injection"
11068d438288SAkinobu Mita	depends on DEBUG_KERNEL
11078d438288SAkinobu Mita	select DEBUG_FS
11088d438288SAkinobu Mita	help
11098d438288SAkinobu Mita	  This option provides the ability to inject artifical errors to
11108d438288SAkinobu Mita	  specified notifier chain callbacks. It is useful to test the error
11118d438288SAkinobu Mita	  handling of notifier call chain failures.
11128d438288SAkinobu Mita
11138d438288SAkinobu Mita	  Say N if unsure.
11148d438288SAkinobu Mita
1115c9d221f8SAkinobu Mitaconfig CPU_NOTIFIER_ERROR_INJECT
1116c9d221f8SAkinobu Mita	tristate "CPU notifier error injection module"
1117f5a9f52eSAkinobu Mita	depends on HOTPLUG_CPU && NOTIFIER_ERROR_INJECTION
1118c9d221f8SAkinobu Mita	help
1119c9d221f8SAkinobu Mita	  This option provides a kernel module that can be used to test
1120f5a9f52eSAkinobu Mita	  the error handling of the cpu notifiers by injecting artifical
1121f5a9f52eSAkinobu Mita	  errors to CPU notifier chain callbacks.  It is controlled through
1122f5a9f52eSAkinobu Mita	  debugfs interface under /sys/kernel/debug/notifier-error-inject/cpu
1123f5a9f52eSAkinobu Mita
1124f5a9f52eSAkinobu Mita	  If the notifier call chain should be failed with some events
1125f5a9f52eSAkinobu Mita	  notified, write the error code to "actions/<notifier event>/error".
1126f5a9f52eSAkinobu Mita
1127f5a9f52eSAkinobu Mita	  Example: Inject CPU offline error (-1 == -EPERM)
1128f5a9f52eSAkinobu Mita
1129f5a9f52eSAkinobu Mita	  # cd /sys/kernel/debug/notifier-error-inject/cpu
1130f5a9f52eSAkinobu Mita	  # echo -1 > actions/CPU_DOWN_PREPARE/error
1131f5a9f52eSAkinobu Mita	  # echo 0 > /sys/devices/system/cpu/cpu1/online
1132f5a9f52eSAkinobu Mita	  bash: echo: write error: Operation not permitted
1133c9d221f8SAkinobu Mita
1134c9d221f8SAkinobu Mita	  To compile this code as a module, choose M here: the module will
1135c9d221f8SAkinobu Mita	  be called cpu-notifier-error-inject.
1136c9d221f8SAkinobu Mita
1137c9d221f8SAkinobu Mita	  If unsure, say N.
1138c9d221f8SAkinobu Mita
1139048b9c35SAkinobu Mitaconfig PM_NOTIFIER_ERROR_INJECT
1140048b9c35SAkinobu Mita	tristate "PM notifier error injection module"
1141048b9c35SAkinobu Mita	depends on PM && NOTIFIER_ERROR_INJECTION
1142048b9c35SAkinobu Mita	default m if PM_DEBUG
1143048b9c35SAkinobu Mita	help
1144048b9c35SAkinobu Mita	  This option provides the ability to inject artifical errors to
1145048b9c35SAkinobu Mita	  PM notifier chain callbacks.  It is controlled through debugfs
1146048b9c35SAkinobu Mita	  interface /sys/kernel/debug/notifier-error-inject/pm
1147048b9c35SAkinobu Mita
1148048b9c35SAkinobu Mita	  If the notifier call chain should be failed with some events
1149048b9c35SAkinobu Mita	  notified, write the error code to "actions/<notifier event>/error".
1150048b9c35SAkinobu Mita
1151048b9c35SAkinobu Mita	  Example: Inject PM suspend error (-12 = -ENOMEM)
1152048b9c35SAkinobu Mita
1153048b9c35SAkinobu Mita	  # cd /sys/kernel/debug/notifier-error-inject/pm/
1154048b9c35SAkinobu Mita	  # echo -12 > actions/PM_SUSPEND_PREPARE/error
1155048b9c35SAkinobu Mita	  # echo mem > /sys/power/state
1156048b9c35SAkinobu Mita	  bash: echo: write error: Cannot allocate memory
1157048b9c35SAkinobu Mita
1158048b9c35SAkinobu Mita	  To compile this code as a module, choose M here: the module will
1159048b9c35SAkinobu Mita	  be called pm-notifier-error-inject.
1160048b9c35SAkinobu Mita
1161048b9c35SAkinobu Mita	  If unsure, say N.
1162048b9c35SAkinobu Mita
11639579f5bdSAkinobu Mitaconfig MEMORY_NOTIFIER_ERROR_INJECT
11649579f5bdSAkinobu Mita	tristate "Memory hotplug notifier error injection module"
11659579f5bdSAkinobu Mita	depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
11669579f5bdSAkinobu Mita	help
11679579f5bdSAkinobu Mita	  This option provides the ability to inject artifical errors to
11689579f5bdSAkinobu Mita	  memory hotplug notifier chain callbacks.  It is controlled through
11699579f5bdSAkinobu Mita	  debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
11709579f5bdSAkinobu Mita
11719579f5bdSAkinobu Mita	  If the notifier call chain should be failed with some events
11729579f5bdSAkinobu Mita	  notified, write the error code to "actions/<notifier event>/error".
11739579f5bdSAkinobu Mita
11749579f5bdSAkinobu Mita	  Example: Inject memory hotplug offline error (-12 == -ENOMEM)
11759579f5bdSAkinobu Mita
11769579f5bdSAkinobu Mita	  # cd /sys/kernel/debug/notifier-error-inject/memory
11779579f5bdSAkinobu Mita	  # echo -12 > actions/MEM_GOING_OFFLINE/error
11789579f5bdSAkinobu Mita	  # echo offline > /sys/devices/system/memory/memoryXXX/state
11799579f5bdSAkinobu Mita	  bash: echo: write error: Cannot allocate memory
11809579f5bdSAkinobu Mita
11819579f5bdSAkinobu Mita	  To compile this code as a module, choose M here: the module will
11829579f5bdSAkinobu Mita	  be called pSeries-reconfig-notifier-error-inject.
11839579f5bdSAkinobu Mita
11849579f5bdSAkinobu Mita	  If unsure, say N.
11859579f5bdSAkinobu Mita
118608dfb4ddSAkinobu Mitaconfig PSERIES_RECONFIG_NOTIFIER_ERROR_INJECT
118708dfb4ddSAkinobu Mita	tristate "pSeries reconfig notifier error injection module"
118808dfb4ddSAkinobu Mita	depends on PPC_PSERIES && NOTIFIER_ERROR_INJECTION
118908dfb4ddSAkinobu Mita	help
119008dfb4ddSAkinobu Mita	  This option provides the ability to inject artifical errors to
119108dfb4ddSAkinobu Mita	  pSeries reconfig notifier chain callbacks.  It is controlled
119208dfb4ddSAkinobu Mita	  through debugfs interface under
119308dfb4ddSAkinobu Mita	  /sys/kernel/debug/notifier-error-inject/pSeries-reconfig/
119408dfb4ddSAkinobu Mita
119508dfb4ddSAkinobu Mita	  If the notifier call chain should be failed with some events
119608dfb4ddSAkinobu Mita	  notified, write the error code to "actions/<notifier event>/error".
119708dfb4ddSAkinobu Mita
119808dfb4ddSAkinobu Mita	  To compile this code as a module, choose M here: the module will
119908dfb4ddSAkinobu Mita	  be called memory-notifier-error-inject.
120008dfb4ddSAkinobu Mita
120108dfb4ddSAkinobu Mita	  If unsure, say N.
120208dfb4ddSAkinobu Mita
12036ff1cb35SAkinobu Mitaconfig FAULT_INJECTION
12041ab8509aSAndrew Morton	bool "Fault-injection framework"
12051ab8509aSAndrew Morton	depends on DEBUG_KERNEL
1206329409aeSAkinobu Mita	help
1207329409aeSAkinobu Mita	  Provide fault-injection framework.
1208329409aeSAkinobu Mita	  For more details, see Documentation/fault-injection/.
12096ff1cb35SAkinobu Mita
12108a8b6502SAkinobu Mitaconfig FAILSLAB
12111ab8509aSAndrew Morton	bool "Fault-injection capability for kmalloc"
12121ab8509aSAndrew Morton	depends on FAULT_INJECTION
1213773ff60eSAkinobu Mita	depends on SLAB || SLUB
12148a8b6502SAkinobu Mita	help
12151ab8509aSAndrew Morton	  Provide fault-injection capability for kmalloc.
12168a8b6502SAkinobu Mita
1217933e312eSAkinobu Mitaconfig FAIL_PAGE_ALLOC
1218933e312eSAkinobu Mita	bool "Fault-injection capabilitiy for alloc_pages()"
12191ab8509aSAndrew Morton	depends on FAULT_INJECTION
1220933e312eSAkinobu Mita	help
12211ab8509aSAndrew Morton	  Provide fault-injection capability for alloc_pages().
1222933e312eSAkinobu Mita
1223c17bb495SAkinobu Mitaconfig FAIL_MAKE_REQUEST
122486327d19SDave Jones	bool "Fault-injection capability for disk IO"
1225581d4e28SJens Axboe	depends on FAULT_INJECTION && BLOCK
1226c17bb495SAkinobu Mita	help
12271ab8509aSAndrew Morton	  Provide fault-injection capability for disk IO.
1228c17bb495SAkinobu Mita
1229581d4e28SJens Axboeconfig FAIL_IO_TIMEOUT
1230f4d01439STakuya Yoshikawa	bool "Fault-injection capability for faking disk interrupts"
1231581d4e28SJens Axboe	depends on FAULT_INJECTION && BLOCK
1232581d4e28SJens Axboe	help
1233581d4e28SJens Axboe	  Provide fault-injection capability on end IO handling. This
1234581d4e28SJens Axboe	  will make the block layer "forget" an interrupt as configured,
1235581d4e28SJens Axboe	  thus exercising the error handling.
1236581d4e28SJens Axboe
1237581d4e28SJens Axboe	  Only works with drivers that use the generic timeout handling,
1238581d4e28SJens Axboe	  for others it wont do anything.
1239581d4e28SJens Axboe
12401b676f70SPer Forlinconfig FAIL_MMC_REQUEST
12411b676f70SPer Forlin	bool "Fault-injection capability for MMC IO"
12421b676f70SPer Forlin	select DEBUG_FS
12431b676f70SPer Forlin	depends on FAULT_INJECTION && MMC
12441b676f70SPer Forlin	help
12451b676f70SPer Forlin	  Provide fault-injection capability for MMC IO.
12461b676f70SPer Forlin	  This will make the mmc core return data errors. This is
12471b676f70SPer Forlin	  useful to test the error handling in the mmc block device
12481b676f70SPer Forlin	  and to test how the mmc host driver handles retries from
12491b676f70SPer Forlin	  the block device.
12501b676f70SPer Forlin
12516ff1cb35SAkinobu Mitaconfig FAULT_INJECTION_DEBUG_FS
12526ff1cb35SAkinobu Mita	bool "Debugfs entries for fault-injection capabilities"
12531ab8509aSAndrew Morton	depends on FAULT_INJECTION && SYSFS && DEBUG_FS
12546ff1cb35SAkinobu Mita	help
12551ab8509aSAndrew Morton	  Enable configuration of fault-injection capabilities via debugfs.
12561df49008SAkinobu Mita
12571df49008SAkinobu Mitaconfig FAULT_INJECTION_STACKTRACE_FILTER
12581df49008SAkinobu Mita	bool "stacktrace filter for fault-injection capabilities"
12591df49008SAkinobu Mita	depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
12606d690dcaSAkinobu Mita	depends on !X86_64
12611df49008SAkinobu Mita	select STACKTRACE
126289bace65SArnd Bergmann	select FRAME_POINTER if !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND
12631df49008SAkinobu Mita	help
12641df49008SAkinobu Mita	  Provide stacktrace filter for fault-injection capabilities
1265267c4025SMathieu Desnoyers
12669745512cSArjan van de Venconfig LATENCYTOP
12679745512cSArjan van de Ven	bool "Latency measuring infrastructure"
1268625fdcaaSRandy Dunlap	depends on HAVE_LATENCYTOP_SUPPORT
1269625fdcaaSRandy Dunlap	depends on DEBUG_KERNEL
1270625fdcaaSRandy Dunlap	depends on STACKTRACE_SUPPORT
1271625fdcaaSRandy Dunlap	depends on PROC_FS
127289bace65SArnd Bergmann	select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND
12739745512cSArjan van de Ven	select KALLSYMS
12749745512cSArjan van de Ven	select KALLSYMS_ALL
12759745512cSArjan van de Ven	select STACKTRACE
12769745512cSArjan van de Ven	select SCHEDSTATS
12779745512cSArjan van de Ven	select SCHED_DEBUG
12789745512cSArjan van de Ven	help
12799745512cSArjan van de Ven	  Enable this option if you want to use the LatencyTOP tool
12809745512cSArjan van de Ven	  to find out which userspace is blocking on what kernel operations.
12819745512cSArjan van de Ven
12826a11f75bSAkinobu Mitasource mm/Kconfig.debug
128316444a8aSArnaldo Carvalho de Melosource kernel/trace/Kconfig
128416444a8aSArnaldo Carvalho de Melo
1285f212ec4bSBernhard Kaindlconfig PROVIDE_OHCI1394_DMA_INIT
1286080de8c2SStefan Richter	bool "Remote debugging over FireWire early on boot"
1287f212ec4bSBernhard Kaindl	depends on PCI && X86
1288f212ec4bSBernhard Kaindl	help
1289f212ec4bSBernhard Kaindl	  If you want to debug problems which hang or crash the kernel early
1290f212ec4bSBernhard Kaindl	  on boot and the crashing machine has a FireWire port, you can use
1291f212ec4bSBernhard Kaindl	  this feature to remotely access the memory of the crashed machine
1292f212ec4bSBernhard Kaindl	  over FireWire. This employs remote DMA as part of the OHCI1394
1293f212ec4bSBernhard Kaindl	  specification which is now the standard for FireWire controllers.
1294f212ec4bSBernhard Kaindl
1295f212ec4bSBernhard Kaindl	  With remote DMA, you can monitor the printk buffer remotely using
1296f212ec4bSBernhard Kaindl	  firescope and access all memory below 4GB using fireproxy from gdb.
1297f212ec4bSBernhard Kaindl	  Even controlling a kernel debugger is possible using remote DMA.
1298f212ec4bSBernhard Kaindl
1299f212ec4bSBernhard Kaindl	  Usage:
1300f212ec4bSBernhard Kaindl
1301f212ec4bSBernhard Kaindl	  If ohci1394_dma=early is used as boot parameter, it will initialize
1302f212ec4bSBernhard Kaindl	  all OHCI1394 controllers which are found in the PCI config space.
1303f212ec4bSBernhard Kaindl
1304f212ec4bSBernhard Kaindl	  As all changes to the FireWire bus such as enabling and disabling
1305f212ec4bSBernhard Kaindl	  devices cause a bus reset and thereby disable remote DMA for all
1306f212ec4bSBernhard Kaindl	  devices, be sure to have the cable plugged and FireWire enabled on
1307f212ec4bSBernhard Kaindl	  the debugging host before booting the debug target for debugging.
1308f212ec4bSBernhard Kaindl
1309f212ec4bSBernhard Kaindl	  This code (~1k) is freed after boot. By then, the firewire stack
1310f212ec4bSBernhard Kaindl	  in charge of the OHCI-1394 controllers should be used instead.
1311f212ec4bSBernhard Kaindl
1312f212ec4bSBernhard Kaindl	  See Documentation/debugging-via-ohci1394.txt for more information.
13139745512cSArjan van de Ven
1314080de8c2SStefan Richterconfig FIREWIRE_OHCI_REMOTE_DMA
1315080de8c2SStefan Richter	bool "Remote debugging over FireWire with firewire-ohci"
1316080de8c2SStefan Richter	depends on FIREWIRE_OHCI
1317080de8c2SStefan Richter	help
1318080de8c2SStefan Richter	  This option lets you use the FireWire bus for remote debugging
1319080de8c2SStefan Richter	  with help of the firewire-ohci driver. It enables unfiltered
1320080de8c2SStefan Richter	  remote DMA in firewire-ohci.
1321080de8c2SStefan Richter	  See Documentation/debugging-via-ohci1394.txt for more information.
1322080de8c2SStefan Richter
1323080de8c2SStefan Richter	  If unsure, say N.
1324080de8c2SStefan Richter
1325152de30bSRandy Dunlapconfig BUILD_DOCSRC
13263794f3e8SRandy Dunlap	bool "Build targets in Documentation/ tree"
13273794f3e8SRandy Dunlap	depends on HEADERS_CHECK
13283794f3e8SRandy Dunlap	help
13293794f3e8SRandy Dunlap	  This option attempts to build objects from the source files in the
13303794f3e8SRandy Dunlap	  kernel Documentation/ tree.
13313794f3e8SRandy Dunlap
13323794f3e8SRandy Dunlap	  Say N if you are unsure.
13333794f3e8SRandy Dunlap
1334e9d376f0SJason Baronconfig DYNAMIC_DEBUG
133586151fdfSJason Baron	bool "Enable dynamic printk() support"
1336346e15beSJason Baron	default n
1337346e15beSJason Baron	depends on PRINTK
133886151fdfSJason Baron	depends on DEBUG_FS
1339346e15beSJason Baron	help
1340346e15beSJason Baron
1341346e15beSJason Baron	  Compiles debug level messages into the kernel, which would not
1342346e15beSJason Baron	  otherwise be available at runtime. These messages can then be
134386151fdfSJason Baron	  enabled/disabled based on various levels of scope - per source file,
134486151fdfSJason Baron	  function, module, format string, and line number. This mechanism
134529e36c9fSJim Cromie	  implicitly compiles in all pr_debug() and dev_dbg() calls, which
134629e36c9fSJim Cromie	  enlarges the kernel text size by about 2%.
134729e36c9fSJim Cromie
134829e36c9fSJim Cromie	  If a source file is compiled with DEBUG flag set, any
134929e36c9fSJim Cromie	  pr_debug() calls in it are enabled by default, but can be
135029e36c9fSJim Cromie	  disabled at runtime as below.  Note that DEBUG flag is
135129e36c9fSJim Cromie	  turned on by many CONFIG_*DEBUG* options.
1352346e15beSJason Baron
1353346e15beSJason Baron	  Usage:
1354346e15beSJason Baron
13552b2f68b5SFlorian Ragwitz	  Dynamic debugging is controlled via the 'dynamic_debug/control' file,
135686151fdfSJason Baron	  which is contained in the 'debugfs' filesystem. Thus, the debugfs
135786151fdfSJason Baron	  filesystem must first be mounted before making use of this feature.
13582b2f68b5SFlorian Ragwitz	  We refer the control file as: <debugfs>/dynamic_debug/control. This
135986151fdfSJason Baron	  file contains a list of the debug statements that can be enabled. The
136086151fdfSJason Baron	  format for each line of the file is:
1361346e15beSJason Baron
136286151fdfSJason Baron		filename:lineno [module]function flags format
1363346e15beSJason Baron
136486151fdfSJason Baron	  filename : source file of the debug statement
136586151fdfSJason Baron	  lineno : line number of the debug statement
136686151fdfSJason Baron	  module : module that contains the debug statement
136786151fdfSJason Baron	  function : function that contains the debug statement
136829e36c9fSJim Cromie          flags : '=p' means the line is turned 'on' for printing
136986151fdfSJason Baron          format : the format used for the debug statement
1370346e15beSJason Baron
1371346e15beSJason Baron	  From a live system:
1372346e15beSJason Baron
13732b2f68b5SFlorian Ragwitz		nullarbor:~ # cat <debugfs>/dynamic_debug/control
137486151fdfSJason Baron		# filename:lineno [module]function flags format
137529e36c9fSJim Cromie		fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
137629e36c9fSJim Cromie		fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
137729e36c9fSJim Cromie		fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
1378346e15beSJason Baron
137986151fdfSJason Baron	  Example usage:
1380346e15beSJason Baron
138186151fdfSJason Baron		// enable the message at line 1603 of file svcsock.c
138286151fdfSJason Baron		nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
13832b2f68b5SFlorian Ragwitz						<debugfs>/dynamic_debug/control
1384346e15beSJason Baron
138586151fdfSJason Baron		// enable all the messages in file svcsock.c
138686151fdfSJason Baron		nullarbor:~ # echo -n 'file svcsock.c +p' >
13872b2f68b5SFlorian Ragwitz						<debugfs>/dynamic_debug/control
1388346e15beSJason Baron
138986151fdfSJason Baron		// enable all the messages in the NFS server module
139086151fdfSJason Baron		nullarbor:~ # echo -n 'module nfsd +p' >
13912b2f68b5SFlorian Ragwitz						<debugfs>/dynamic_debug/control
1392346e15beSJason Baron
139386151fdfSJason Baron		// enable all 12 messages in the function svc_process()
139486151fdfSJason Baron		nullarbor:~ # echo -n 'func svc_process +p' >
13952b2f68b5SFlorian Ragwitz						<debugfs>/dynamic_debug/control
1396346e15beSJason Baron
139786151fdfSJason Baron		// disable all 12 messages in the function svc_process()
139886151fdfSJason Baron		nullarbor:~ # echo -n 'func svc_process -p' >
13992b2f68b5SFlorian Ragwitz						<debugfs>/dynamic_debug/control
1400346e15beSJason Baron
140186151fdfSJason Baron	  See Documentation/dynamic-debug-howto.txt for additional information.
1402346e15beSJason Baron
14035ee00bd4SJoerg Roedelconfig DMA_API_DEBUG
14045ee00bd4SJoerg Roedel	bool "Enable debugging of DMA-API usage"
14055ee00bd4SJoerg Roedel	depends on HAVE_DMA_API_DEBUG
14065ee00bd4SJoerg Roedel	help
14075ee00bd4SJoerg Roedel	  Enable this option to debug the use of the DMA API by device drivers.
14085ee00bd4SJoerg Roedel	  With this option you will be able to detect common bugs in device
14095ee00bd4SJoerg Roedel	  drivers like double-freeing of DMA mappings or freeing mappings that
14105ee00bd4SJoerg Roedel	  were never allocated.
14115ee00bd4SJoerg Roedel	  This option causes a performance degredation.  Use only if you want
14125ee00bd4SJoerg Roedel	  to debug device drivers. If unsure, say N.
1413346e15beSJason Baron
141486a89380SLuca Barbiericonfig ATOMIC64_SELFTEST
141586a89380SLuca Barbieri	bool "Perform an atomic64_t self-test at boot"
141686a89380SLuca Barbieri	help
141786a89380SLuca Barbieri	  Enable this option to test the atomic64_t functions at boot.
141886a89380SLuca Barbieri
141986a89380SLuca Barbieri	  If unsure, say N.
142086a89380SLuca Barbieri
1421400fb7f6SDan Williamsconfig ASYNC_RAID6_TEST
1422400fb7f6SDan Williams	tristate "Self test for hardware accelerated raid6 recovery"
1423400fb7f6SDan Williams	depends on ASYNC_RAID6_RECOV
1424400fb7f6SDan Williams	select ASYNC_MEMCPY
1425400fb7f6SDan Williams	---help---
1426400fb7f6SDan Williams	  This is a one-shot self test that permutes through the
1427400fb7f6SDan Williams	  recovery of all the possible two disk failure scenarios for a
1428400fb7f6SDan Williams	  N-disk array.  Recovery is performed with the asynchronous
1429400fb7f6SDan Williams	  raid6 recovery routines, and will optionally use an offload
1430400fb7f6SDan Williams	  engine if one is available.
1431400fb7f6SDan Williams
1432400fb7f6SDan Williams	  If unsure, say N.
1433400fb7f6SDan Williams
1434267c4025SMathieu Desnoyerssource "samples/Kconfig"
1435dc7d5527SJason Wessel
1436dc7d5527SJason Wesselsource "lib/Kconfig.kgdb"
14370a4af3b0SPekka Enberg
14380a4af3b0SPekka Enbergsource "lib/Kconfig.kmemcheck"
143933ee3b2eSAlexey Dobriyan
144033ee3b2eSAlexey Dobriyanconfig TEST_KSTRTOX
144133ee3b2eSAlexey Dobriyan	tristate "Test kstrto*() family of functions at runtime"
1442