power: rk81x battery: use get_monotonic_boottime to get system run time
[firefly-linux-kernel-4.4.55.git] / lib / Kconfig.debug
1
2 config PRINTK_TIME
3         bool "Show timing information on printks"
4         depends on PRINTK
5         help
6           Selecting this option causes time stamps of the printk()
7           messages to be added to the output of the syslog() system
8           call and at the console.
9
10           The timestamp is always recorded internally, and exported
11           to /dev/kmsg. This flag just specifies if the timestamp should
12           be included, not that the timestamp is recorded.
13
14           The behavior is also controlled by the kernel command line
15           parameter printk.time=1. See Documentation/kernel-parameters.txt
16
17 config PRINTK_PROCESS
18         bool "Show process information on printks"
19         depends on PRINTK
20         help
21           Selecting this option causes process to be
22           included in printk output. Or add printk.process=1 at boot-time.
23
24 config DEFAULT_MESSAGE_LOGLEVEL
25         int "Default message log level (1-7)"
26         range 1 7
27         default "4"
28         help
29           Default log level for printk statements with no specified priority.
30
31           This was hard-coded to KERN_WARNING since at least 2.6.10 but folks
32           that are auditing their logs closely may want to set it to a lower
33           priority.
34
35 config ENABLE_WARN_DEPRECATED
36         bool "Enable __deprecated logic"
37         default y
38         help
39           Enable the __deprecated logic in the kernel build.
40           Disable this to suppress the "warning: 'foo' is deprecated
41           (declared at kernel/power/somefile.c:1234)" messages.
42
43 config ENABLE_MUST_CHECK
44         bool "Enable __must_check logic"
45         default y
46         help
47           Enable the __must_check logic in the kernel build.  Disable this to
48           suppress the "warning: ignoring return value of 'foo', declared with
49           attribute warn_unused_result" messages.
50
51 config FRAME_WARN
52         int "Warn for stack frames larger than (needs gcc 4.4)"
53         range 0 8192
54         default 1024 if !64BIT
55         default 2048 if 64BIT
56         help
57           Tell gcc to warn at build time for stack frames larger than this.
58           Setting this too low will cause a lot of warnings.
59           Setting it to 0 disables the warning.
60           Requires gcc 4.4
61
62 config MAGIC_SYSRQ
63         bool "Magic SysRq key"
64         depends on !UML
65         help
66           If you say Y here, you will have some control over the system even
67           if the system crashes for example during kernel debugging (e.g., you
68           will be able to flush the buffer cache to disk, reboot the system
69           immediately or dump some status information). This is accomplished
70           by pressing various keys while holding SysRq (Alt+PrintScreen). It
71           also works on a serial console (on PC hardware at least), if you
72           send a BREAK and then within 5 seconds a command keypress. The
73           keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
74           unless you really know what this hack does.
75
76 config STRIP_ASM_SYMS
77         bool "Strip assembler-generated symbols during link"
78         default n
79         help
80           Strip internal assembler-generated symbols during a link (symbols
81           that look like '.Lxxx') so they don't pollute the output of
82           get_wchan() and suchlike.
83
84 config READABLE_ASM
85         bool "Generate readable assembler code"
86         depends on DEBUG_KERNEL
87         help
88           Disable some compiler optimizations that tend to generate human unreadable
89           assembler output. This may make the kernel slightly slower, but it helps
90           to keep kernel developers who have to stare a lot at assembler listings
91           sane.
92
93 config UNUSED_SYMBOLS
94         bool "Enable unused/obsolete exported symbols"
95         default y if X86
96         help
97           Unused but exported symbols make the kernel needlessly bigger.  For
98           that reason most of these unused exports will soon be removed.  This
99           option is provided temporarily to provide a transition period in case
100           some external kernel module needs one of these symbols anyway. If you
101           encounter such a case in your module, consider if you are actually
102           using the right API.  (rationale: since nobody in the kernel is using
103           this in a module, there is a pretty good chance it's actually the
104           wrong interface to use).  If you really need the symbol, please send a
105           mail to the linux kernel mailing list mentioning the symbol and why
106           you really need it, and what the merge plan to the mainline kernel for
107           your module is.
108
109 config DEBUG_FS
110         bool "Debug Filesystem"
111         help
112           debugfs is a virtual file system that kernel developers use to put
113           debugging files into.  Enable this option to be able to read and
114           write to these files.
115
116           For detailed documentation on the debugfs API, see
117           Documentation/DocBook/filesystems.
118
119           If unsure, say N.
120
121 config HEADERS_CHECK
122         bool "Run 'make headers_check' when building vmlinux"
123         depends on !UML
124         help
125           This option will extract the user-visible kernel headers whenever
126           building the kernel, and will run basic sanity checks on them to
127           ensure that exported files do not attempt to include files which
128           were not exported, etc.
129
130           If you're making modifications to header files which are
131           relevant for userspace, say 'Y', and check the headers
132           exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
133           your build tree), to make sure they're suitable.
134
135 config DEBUG_SECTION_MISMATCH
136         bool "Enable full Section mismatch analysis"
137         help
138           The section mismatch analysis checks if there are illegal
139           references from one section to another section.
140           During linktime or runtime, some sections are dropped;
141           any use of code/data previously in these sections would
142           most likely result in an oops.
143           In the code, functions and variables are annotated with
144           __init, __cpuinit, etc. (see the full list in include/linux/init.h),
145           which results in the code/data being placed in specific sections.
146           The section mismatch analysis is always performed after a full
147           kernel build, and enabling this option causes the following
148           additional steps to occur:
149           - Add the option -fno-inline-functions-called-once to gcc commands.
150             When inlining a function annotated with __init in a non-init
151             function, we would lose the section information and thus
152             the analysis would not catch the illegal reference.
153             This option tells gcc to inline less (but it does result in
154             a larger kernel).
155           - Run the section mismatch analysis for each module/built-in.o file.
156             When we run the section mismatch analysis on vmlinux.o, we
157             lose valueble information about where the mismatch was
158             introduced.
159             Running the analysis for each module/built-in.o file
160             tells where the mismatch happens much closer to the
161             source. The drawback is that the same mismatch is
162             reported at least twice.
163           - Enable verbose reporting from modpost in order to help resolve
164             the section mismatches that are reported.
165
166 config DEBUG_KERNEL
167         bool "Kernel debugging"
168         help
169           Say Y here if you are developing drivers or trying to debug and
170           identify kernel problems.
171
172 config DEBUG_SHIRQ
173         bool "Debug shared IRQ handlers"
174         depends on DEBUG_KERNEL && GENERIC_HARDIRQS
175         help
176           Enable this to generate a spurious interrupt as soon as a shared
177           interrupt handler is registered, and just before one is deregistered.
178           Drivers ought to be able to handle interrupts coming in at those
179           points; some don't and need to be caught.
180
181 config LOCKUP_DETECTOR
182         bool "Detect Hard and Soft Lockups"
183         depends on DEBUG_KERNEL && !S390
184         help
185           Say Y here to enable the kernel to act as a watchdog to detect
186           hard and soft lockups.
187
188           Softlockups are bugs that cause the kernel to loop in kernel
189           mode for more than 20 seconds, without giving other tasks a
190           chance to run.  The current stack trace is displayed upon
191           detection and the system will stay locked up.
192
193           Hardlockups are bugs that cause the CPU to loop in kernel mode
194           for more than 10 seconds, without letting other interrupts have a
195           chance to run.  The current stack trace is displayed upon detection
196           and the system will stay locked up.
197
198           The overhead should be minimal.  A periodic hrtimer runs to
199           generate interrupts and kick the watchdog task every 4 seconds.
200           An NMI is generated every 10 seconds or so to check for hardlockups.
201           If NMIs are not available on the platform, every 12 seconds the
202           hrtimer interrupt on one cpu will be used to check for hardlockups
203           on the next cpu.
204
205           The frequency of hrtimer and NMI events and the soft and hard lockup
206           thresholds can be controlled through the sysctl watchdog_thresh.
207
208 config HARDLOCKUP_DETECTOR_NMI
209         def_bool y
210         depends on LOCKUP_DETECTOR && !HAVE_NMI_WATCHDOG
211         depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI
212
213 config HARDLOCKUP_DETECTOR_OTHER_CPU
214         def_bool y
215         depends on LOCKUP_DETECTOR && SMP
216         depends on !HARDLOCKUP_DETECTOR_NMI && !HAVE_NMI_WATCHDOG
217
218 config HARDLOCKUP_DETECTOR
219         def_bool y
220         depends on HARDLOCKUP_DETECTOR_NMI || HARDLOCKUP_DETECTOR_OTHER_CPU
221
222 config BOOTPARAM_HARDLOCKUP_PANIC
223         bool "Panic (Reboot) On Hard Lockups"
224         depends on HARDLOCKUP_DETECTOR
225         help
226           Say Y here to enable the kernel to panic on "hard lockups",
227           which are bugs that cause the kernel to loop in kernel
228           mode with interrupts disabled for more than 10 seconds (configurable
229           using the watchdog_thresh sysctl).
230
231           Say N if unsure.
232
233 config BOOTPARAM_HARDLOCKUP_PANIC_VALUE
234         int
235         depends on HARDLOCKUP_DETECTOR
236         range 0 1
237         default 0 if !BOOTPARAM_HARDLOCKUP_PANIC
238         default 1 if BOOTPARAM_HARDLOCKUP_PANIC
239
240 config BOOTPARAM_SOFTLOCKUP_PANIC
241         bool "Panic (Reboot) On Soft Lockups"
242         depends on LOCKUP_DETECTOR
243         help
244           Say Y here to enable the kernel to panic on "soft lockups",
245           which are bugs that cause the kernel to loop in kernel
246           mode for more than 20 seconds (configurable using the watchdog_thresh
247           sysctl), without giving other tasks a chance to run.
248
249           The panic can be used in combination with panic_timeout,
250           to cause the system to reboot automatically after a
251           lockup has been detected. This feature is useful for
252           high-availability systems that have uptime guarantees and
253           where a lockup must be resolved ASAP.
254
255           Say N if unsure.
256
257 config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
258         int
259         depends on LOCKUP_DETECTOR
260         range 0 1
261         default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
262         default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
263
264 config PANIC_ON_OOPS
265         bool "Panic on Oops"
266         help
267           Say Y here to enable the kernel to panic when it oopses. This
268           has the same effect as setting oops=panic on the kernel command
269           line.
270
271           This feature is useful to ensure that the kernel does not do
272           anything erroneous after an oops which could result in data
273           corruption or other issues.
274
275           Say N if unsure.
276
277 config PANIC_ON_OOPS_VALUE
278         int
279         range 0 1
280         default 0 if !PANIC_ON_OOPS
281         default 1 if PANIC_ON_OOPS
282
283 config DETECT_HUNG_TASK
284         bool "Detect Hung Tasks"
285         depends on DEBUG_KERNEL
286         default LOCKUP_DETECTOR
287         help
288           Say Y here to enable the kernel to detect "hung tasks",
289           which are bugs that cause the task to be stuck in
290           uninterruptible "D" state indefinitiley.
291
292           When a hung task is detected, the kernel will print the
293           current stack trace (which you should report), but the
294           task will stay in uninterruptible state. If lockdep is
295           enabled then all held locks will also be reported. This
296           feature has negligible overhead.
297
298 config DEFAULT_HUNG_TASK_TIMEOUT
299         int "Default timeout for hung task detection (in seconds)"
300         depends on DETECT_HUNG_TASK
301         default 120
302         help
303           This option controls the default timeout (in seconds) used
304           to determine when a task has become non-responsive and should
305           be considered hung.
306
307           It can be adjusted at runtime via the kernel.hung_task_timeout_secs
308           sysctl or by writing a value to
309           /proc/sys/kernel/hung_task_timeout_secs.
310
311           A timeout of 0 disables the check.  The default is two minutes.
312           Keeping the default should be fine in most cases.
313
314 config BOOTPARAM_HUNG_TASK_PANIC
315         bool "Panic (Reboot) On Hung Tasks"
316         depends on DETECT_HUNG_TASK
317         help
318           Say Y here to enable the kernel to panic on "hung tasks",
319           which are bugs that cause the kernel to leave a task stuck
320           in uninterruptible "D" state.
321
322           The panic can be used in combination with panic_timeout,
323           to cause the system to reboot automatically after a
324           hung task has been detected. This feature is useful for
325           high-availability systems that have uptime guarantees and
326           where a hung tasks must be resolved ASAP.
327
328           Say N if unsure.
329
330 config BOOTPARAM_HUNG_TASK_PANIC_VALUE
331         int
332         depends on DETECT_HUNG_TASK
333         range 0 1
334         default 0 if !BOOTPARAM_HUNG_TASK_PANIC
335         default 1 if BOOTPARAM_HUNG_TASK_PANIC
336
337 config SCHED_DEBUG
338         bool "Collect scheduler debugging info"
339         depends on DEBUG_KERNEL && PROC_FS
340         default y
341         help
342           If you say Y here, the /proc/sched_debug file will be provided
343           that can help debug the scheduler. The runtime overhead of this
344           option is minimal.
345
346 config SCHEDSTATS
347         bool "Collect scheduler statistics"
348         depends on DEBUG_KERNEL && PROC_FS
349         help
350           If you say Y here, additional code will be inserted into the
351           scheduler and related routines to collect statistics about
352           scheduler behavior and provide them in /proc/schedstat.  These
353           stats may be useful for both tuning and debugging the scheduler
354           If you aren't debugging the scheduler or trying to tune a specific
355           application, you can say N to avoid the very slight overhead
356           this adds.
357
358 config TIMER_STATS
359         bool "Collect kernel timers statistics"
360         depends on DEBUG_KERNEL && PROC_FS
361         help
362           If you say Y here, additional code will be inserted into the
363           timer routines to collect statistics about kernel timers being
364           reprogrammed. The statistics can be read from /proc/timer_stats.
365           The statistics collection is started by writing 1 to /proc/timer_stats,
366           writing 0 stops it. This feature is useful to collect information
367           about timer usage patterns in kernel and userspace. This feature
368           is lightweight if enabled in the kernel config but not activated
369           (it defaults to deactivated on bootup and will only be activated
370           if some application like powertop activates it explicitly).
371
372 config DEBUG_OBJECTS
373         bool "Debug object operations"
374         depends on DEBUG_KERNEL
375         help
376           If you say Y here, additional code will be inserted into the
377           kernel to track the life time of various objects and validate
378           the operations on those objects.
379
380 config DEBUG_OBJECTS_SELFTEST
381         bool "Debug objects selftest"
382         depends on DEBUG_OBJECTS
383         help
384           This enables the selftest of the object debug code.
385
386 config DEBUG_OBJECTS_FREE
387         bool "Debug objects in freed memory"
388         depends on DEBUG_OBJECTS
389         help
390           This enables checks whether a k/v free operation frees an area
391           which contains an object which has not been deactivated
392           properly. This can make kmalloc/kfree-intensive workloads
393           much slower.
394
395 config DEBUG_OBJECTS_TIMERS
396         bool "Debug timer objects"
397         depends on DEBUG_OBJECTS
398         help
399           If you say Y here, additional code will be inserted into the
400           timer routines to track the life time of timer objects and
401           validate the timer operations.
402
403 config DEBUG_OBJECTS_WORK
404         bool "Debug work objects"
405         depends on DEBUG_OBJECTS
406         help
407           If you say Y here, additional code will be inserted into the
408           work queue routines to track the life time of work objects and
409           validate the work operations.
410
411 config DEBUG_OBJECTS_RCU_HEAD
412         bool "Debug RCU callbacks objects"
413         depends on DEBUG_OBJECTS
414         help
415           Enable this to turn on debugging of RCU list heads (call_rcu() usage).
416
417 config DEBUG_OBJECTS_PERCPU_COUNTER
418         bool "Debug percpu counter objects"
419         depends on DEBUG_OBJECTS
420         help
421           If you say Y here, additional code will be inserted into the
422           percpu counter routines to track the life time of percpu counter
423           objects and validate the percpu counter operations.
424
425 config DEBUG_OBJECTS_ENABLE_DEFAULT
426         int "debug_objects bootup default value (0-1)"
427         range 0 1
428         default "1"
429         depends on DEBUG_OBJECTS
430         help
431           Debug objects boot parameter default value
432
433 config DEBUG_SLAB
434         bool "Debug slab memory allocations"
435         depends on DEBUG_KERNEL && SLAB && !KMEMCHECK
436         help
437           Say Y here to have the kernel do limited verification on memory
438           allocation as well as poisoning memory on free to catch use of freed
439           memory. This can make kmalloc/kfree-intensive workloads much slower.
440
441 config DEBUG_SLAB_LEAK
442         bool "Memory leak debugging"
443         depends on DEBUG_SLAB
444
445 config SLUB_DEBUG_ON
446         bool "SLUB debugging on by default"
447         depends on SLUB && SLUB_DEBUG && !KMEMCHECK
448         default n
449         help
450           Boot with debugging on by default. SLUB boots by default with
451           the runtime debug capabilities switched off. Enabling this is
452           equivalent to specifying the "slub_debug" parameter on boot.
453           There is no support for more fine grained debug control like
454           possible with slub_debug=xxx. SLUB debugging may be switched
455           off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
456           "slub_debug=-".
457
458 config SLUB_STATS
459         default n
460         bool "Enable SLUB performance statistics"
461         depends on SLUB && SYSFS
462         help
463           SLUB statistics are useful to debug SLUBs allocation behavior in
464           order find ways to optimize the allocator. This should never be
465           enabled for production use since keeping statistics slows down
466           the allocator by a few percentage points. The slabinfo command
467           supports the determination of the most active slabs to figure
468           out which slabs are relevant to a particular load.
469           Try running: slabinfo -DA
470
471 config HAVE_DEBUG_KMEMLEAK
472         bool
473
474 config DEBUG_KMEMLEAK
475         bool "Kernel memory leak detector"
476         depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
477         select DEBUG_FS
478         select STACKTRACE if STACKTRACE_SUPPORT
479         select KALLSYMS
480         select CRC32
481         help
482           Say Y here if you want to enable the memory leak
483           detector. The memory allocation/freeing is traced in a way
484           similar to the Boehm's conservative garbage collector, the
485           difference being that the orphan objects are not freed but
486           only shown in /sys/kernel/debug/kmemleak. Enabling this
487           feature will introduce an overhead to memory
488           allocations. See Documentation/kmemleak.txt for more
489           details.
490
491           Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
492           of finding leaks due to the slab objects poisoning.
493
494           In order to access the kmemleak file, debugfs needs to be
495           mounted (usually at /sys/kernel/debug).
496
497 config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
498         int "Maximum kmemleak early log entries"
499         depends on DEBUG_KMEMLEAK
500         range 200 40000
501         default 400
502         help
503           Kmemleak must track all the memory allocations to avoid
504           reporting false positives. Since memory may be allocated or
505           freed before kmemleak is initialised, an early log buffer is
506           used to store these actions. If kmemleak reports "early log
507           buffer exceeded", please increase this value.
508
509 config DEBUG_KMEMLEAK_TEST
510         tristate "Simple test for the kernel memory leak detector"
511         depends on DEBUG_KMEMLEAK && m
512         help
513           This option enables a module that explicitly leaks memory.
514
515           If unsure, say N.
516
517 config DEBUG_KMEMLEAK_DEFAULT_OFF
518         bool "Default kmemleak to off"
519         depends on DEBUG_KMEMLEAK
520         help
521           Say Y here to disable kmemleak by default. It can then be enabled
522           on the command line via kmemleak=on.
523
524 config DEBUG_PREEMPT
525         bool "Debug preemptible kernel"
526         depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
527         default y
528         help
529           If you say Y here then the kernel will use a debug variant of the
530           commonly used smp_processor_id() function and will print warnings
531           if kernel code uses it in a preemption-unsafe way. Also, the kernel
532           will detect preemption count underflows.
533
534 config DEBUG_RT_MUTEXES
535         bool "RT Mutex debugging, deadlock detection"
536         depends on DEBUG_KERNEL && RT_MUTEXES
537         help
538          This allows rt mutex semantics violations and rt mutex related
539          deadlocks (lockups) to be detected and reported automatically.
540
541 config DEBUG_PI_LIST
542         bool
543         default y
544         depends on DEBUG_RT_MUTEXES
545
546 config RT_MUTEX_TESTER
547         bool "Built-in scriptable tester for rt-mutexes"
548         depends on DEBUG_KERNEL && RT_MUTEXES
549         help
550           This option enables a rt-mutex tester.
551
552 config DEBUG_SPINLOCK
553         bool "Spinlock and rw-lock debugging: basic checks"
554         depends on DEBUG_KERNEL
555         select UNINLINE_SPIN_UNLOCK
556         help
557           Say Y here and build SMP to catch missing spinlock initialization
558           and certain other kinds of spinlock errors commonly made.  This is
559           best used in conjunction with the NMI watchdog so that spinlock
560           deadlocks are also debuggable.
561
562 config DEBUG_MUTEXES
563         bool "Mutex debugging: basic checks"
564         depends on DEBUG_KERNEL
565         help
566          This feature allows mutex semantics violations to be detected and
567          reported.
568
569 config DEBUG_LOCK_ALLOC
570         bool "Lock debugging: detect incorrect freeing of live locks"
571         depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
572         select DEBUG_SPINLOCK
573         select DEBUG_MUTEXES
574         select LOCKDEP
575         help
576          This feature will check whether any held lock (spinlock, rwlock,
577          mutex or rwsem) is incorrectly freed by the kernel, via any of the
578          memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
579          vfree(), etc.), whether a live lock is incorrectly reinitialized via
580          spin_lock_init()/mutex_init()/etc., or whether there is any lock
581          held during task exit.
582
583 config PROVE_LOCKING
584         bool "Lock debugging: prove locking correctness"
585         depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
586         select LOCKDEP
587         select DEBUG_SPINLOCK
588         select DEBUG_MUTEXES
589         select DEBUG_LOCK_ALLOC
590         select TRACE_IRQFLAGS
591         default n
592         help
593          This feature enables the kernel to prove that all locking
594          that occurs in the kernel runtime is mathematically
595          correct: that under no circumstance could an arbitrary (and
596          not yet triggered) combination of observed locking
597          sequences (on an arbitrary number of CPUs, running an
598          arbitrary number of tasks and interrupt contexts) cause a
599          deadlock.
600
601          In short, this feature enables the kernel to report locking
602          related deadlocks before they actually occur.
603
604          The proof does not depend on how hard and complex a
605          deadlock scenario would be to trigger: how many
606          participant CPUs, tasks and irq-contexts would be needed
607          for it to trigger. The proof also does not depend on
608          timing: if a race and a resulting deadlock is possible
609          theoretically (no matter how unlikely the race scenario
610          is), it will be proven so and will immediately be
611          reported by the kernel (once the event is observed that
612          makes the deadlock theoretically possible).
613
614          If a deadlock is impossible (i.e. the locking rules, as
615          observed by the kernel, are mathematically correct), the
616          kernel reports nothing.
617
618          NOTE: this feature can also be enabled for rwlocks, mutexes
619          and rwsems - in which case all dependencies between these
620          different locking variants are observed and mapped too, and
621          the proof of observed correctness is also maintained for an
622          arbitrary combination of these separate locking variants.
623
624          For more details, see Documentation/lockdep-design.txt.
625
626 config LOCKDEP
627         bool
628         depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
629         select STACKTRACE
630         select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE
631         select KALLSYMS
632         select KALLSYMS_ALL
633
634 config LOCK_STAT
635         bool "Lock usage statistics"
636         depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
637         select LOCKDEP
638         select DEBUG_SPINLOCK
639         select DEBUG_MUTEXES
640         select DEBUG_LOCK_ALLOC
641         default n
642         help
643          This feature enables tracking lock contention points
644
645          For more details, see Documentation/lockstat.txt
646
647          This also enables lock events required by "perf lock",
648          subcommand of perf.
649          If you want to use "perf lock", you also need to turn on
650          CONFIG_EVENT_TRACING.
651
652          CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
653          (CONFIG_LOCKDEP defines "acquire" and "release" events.)
654
655 config DEBUG_LOCKDEP
656         bool "Lock dependency engine debugging"
657         depends on DEBUG_KERNEL && LOCKDEP
658         help
659           If you say Y here, the lock dependency engine will do
660           additional runtime checks to debug itself, at the price
661           of more runtime overhead.
662
663 config TRACE_IRQFLAGS
664         bool
665         help
666           Enables hooks to interrupt enabling and disabling for
667           either tracing or lock debugging.
668
669 config DEBUG_ATOMIC_SLEEP
670         bool "Sleep inside atomic section checking"
671         select PREEMPT_COUNT
672         depends on DEBUG_KERNEL
673         help
674           If you say Y here, various routines which may sleep will become very
675           noisy if they are called inside atomic sections: when a spinlock is
676           held, inside an rcu read side critical section, inside preempt disabled
677           sections, inside an interrupt, etc...
678
679 config DEBUG_LOCKING_API_SELFTESTS
680         bool "Locking API boot-time self-tests"
681         depends on DEBUG_KERNEL
682         help
683           Say Y here if you want the kernel to run a short self-test during
684           bootup. The self-test checks whether common types of locking bugs
685           are detected by debugging mechanisms or not. (if you disable
686           lock debugging then those bugs wont be detected of course.)
687           The following locking APIs are covered: spinlocks, rwlocks,
688           mutexes and rwsems.
689
690 config STACKTRACE
691         bool "Stacktrace"
692         depends on STACKTRACE_SUPPORT
693         default y
694
695 config DEBUG_STACK_USAGE
696         bool "Stack utilization instrumentation"
697         depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG
698         help
699           Enables the display of the minimum amount of free stack which each
700           task has ever had available in the sysrq-T and sysrq-P debug output.
701
702           This option will slow down process creation somewhat.
703
704 config DEBUG_KOBJECT
705         bool "kobject debugging"
706         depends on DEBUG_KERNEL
707         help
708           If you say Y here, some extra kobject debugging messages will be sent
709           to the syslog. 
710
711 config DEBUG_HIGHMEM
712         bool "Highmem debugging"
713         depends on DEBUG_KERNEL && HIGHMEM
714         help
715           This options enables addition error checking for high memory systems.
716           Disable for production systems.
717
718 config HAVE_DEBUG_BUGVERBOSE
719         bool
720
721 config DEBUG_BUGVERBOSE
722         bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT
723         depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE)
724         default y
725         help
726           Say Y here to make BUG() panics output the file name and line number
727           of the BUG call as well as the EIP and oops trace.  This aids
728           debugging but costs about 70-100K of memory.
729
730 config DEBUG_INFO
731         bool "Compile the kernel with debug info"
732         depends on DEBUG_KERNEL
733         help
734           If you say Y here the resulting kernel image will include
735           debugging info resulting in a larger kernel image.
736           This adds debug symbols to the kernel and modules (gcc -g), and
737           is needed if you intend to use kernel crashdump or binary object
738           tools like crash, kgdb, LKCD, gdb, etc on the kernel.
739           Say Y here only if you plan to debug the kernel.
740
741           If unsure, say N.
742
743 config DEBUG_INFO_REDUCED
744         bool "Reduce debugging information"
745         depends on DEBUG_INFO
746         help
747           If you say Y here gcc is instructed to generate less debugging
748           information for structure types. This means that tools that
749           need full debugging information (like kgdb or systemtap) won't
750           be happy. But if you merely need debugging information to
751           resolve line numbers there is no loss. Advantage is that
752           build directory object sizes shrink dramatically over a full
753           DEBUG_INFO build and compile times are reduced too.
754           Only works with newer gcc versions.
755
756 config DEBUG_VM
757         bool "Debug VM"
758         depends on DEBUG_KERNEL
759         help
760           Enable this to turn on extended checks in the virtual-memory system
761           that may impact performance.
762
763           If unsure, say N.
764
765 config DEBUG_VM_RB
766         bool "Debug VM red-black trees"
767         depends on DEBUG_VM
768         help
769           Enable this to turn on more extended checks in the virtual-memory
770           system that may impact performance.
771
772           If unsure, say N.
773
774 config DEBUG_VIRTUAL
775         bool "Debug VM translations"
776         depends on DEBUG_KERNEL && X86
777         help
778           Enable some costly sanity checks in virtual to page code. This can
779           catch mistakes with virt_to_page() and friends.
780
781           If unsure, say N.
782
783 config DEBUG_NOMMU_REGIONS
784         bool "Debug the global anon/private NOMMU mapping region tree"
785         depends on DEBUG_KERNEL && !MMU
786         help
787           This option causes the global tree of anonymous and private mapping
788           regions to be regularly checked for invalid topology.
789
790 config DEBUG_WRITECOUNT
791         bool "Debug filesystem writers count"
792         depends on DEBUG_KERNEL
793         help
794           Enable this to catch wrong use of the writers count in struct
795           vfsmount.  This will increase the size of each file struct by
796           32 bits.
797
798           If unsure, say N.
799
800 config DEBUG_MEMORY_INIT
801         bool "Debug memory initialisation" if EXPERT
802         default !EXPERT
803         help
804           Enable this for additional checks during memory initialisation.
805           The sanity checks verify aspects of the VM such as the memory model
806           and other information provided by the architecture. Verbose
807           information will be printed at KERN_DEBUG loglevel depending
808           on the mminit_loglevel= command-line option.
809
810           If unsure, say Y
811
812 config DEBUG_LIST
813         bool "Debug linked list manipulation"
814         depends on DEBUG_KERNEL
815         help
816           Enable this to turn on extended checks in the linked-list
817           walking routines.
818
819           If unsure, say N.
820
821 config TEST_LIST_SORT
822         bool "Linked list sorting test"
823         depends on DEBUG_KERNEL
824         help
825           Enable this to turn on 'list_sort()' function test. This test is
826           executed only once during system boot, so affects only boot time.
827
828           If unsure, say N.
829
830 config DEBUG_SG
831         bool "Debug SG table operations"
832         depends on DEBUG_KERNEL
833         help
834           Enable this to turn on checks on scatter-gather tables. This can
835           help find problems with drivers that do not properly initialize
836           their sg tables.
837
838           If unsure, say N.
839
840 config DEBUG_NOTIFIERS
841         bool "Debug notifier call chains"
842         depends on DEBUG_KERNEL
843         help
844           Enable this to turn on sanity checking for notifier call chains.
845           This is most useful for kernel developers to make sure that
846           modules properly unregister themselves from notifier chains.
847           This is a relatively cheap check but if you care about maximum
848           performance, say N.
849
850 config DEBUG_CREDENTIALS
851         bool "Debug credential management"
852         depends on DEBUG_KERNEL
853         help
854           Enable this to turn on some debug checking for credential
855           management.  The additional code keeps track of the number of
856           pointers from task_structs to any given cred struct, and checks to
857           see that this number never exceeds the usage count of the cred
858           struct.
859
860           Furthermore, if SELinux is enabled, this also checks that the
861           security pointer in the cred struct is never seen to be invalid.
862
863           If unsure, say N.
864
865 #
866 # Select this config option from the architecture Kconfig, if it
867 # is preferred to always offer frame pointers as a config
868 # option on the architecture (regardless of KERNEL_DEBUG):
869 #
870 config ARCH_WANT_FRAME_POINTERS
871         bool
872         help
873
874 config FRAME_POINTER
875         bool "Compile the kernel with frame pointers"
876         depends on DEBUG_KERNEL && \
877                 (CRIS || M68K || FRV || UML || \
878                  AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \
879                 ARCH_WANT_FRAME_POINTERS
880         default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
881         help
882           If you say Y here the resulting kernel image will be slightly
883           larger and slower, but it gives very useful debugging information
884           in case of kernel bugs. (precise oopses/stacktraces/warnings)
885
886 config BOOT_PRINTK_DELAY
887         bool "Delay each boot printk message by N milliseconds"
888         depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
889         help
890           This build option allows you to read kernel boot messages
891           by inserting a short delay after each one.  The delay is
892           specified in milliseconds on the kernel command line,
893           using "boot_delay=N".
894
895           It is likely that you would also need to use "lpj=M" to preset
896           the "loops per jiffie" value.
897           See a previous boot log for the "lpj" value to use for your
898           system, and then set "lpj=M" before setting "boot_delay=N".
899           NOTE:  Using this option may adversely affect SMP systems.
900           I.e., processors other than the first one may not boot up.
901           BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect
902           what it believes to be lockup conditions.
903
904 menu "RCU Debugging"
905
906 config PROVE_RCU
907         bool "RCU debugging: prove RCU correctness"
908         depends on PROVE_LOCKING
909         default n
910         help
911          This feature enables lockdep extensions that check for correct
912          use of RCU APIs.  This is currently under development.  Say Y
913          if you want to debug RCU usage or help work on the PROVE_RCU
914          feature.
915
916          Say N if you are unsure.
917
918 config PROVE_RCU_REPEATEDLY
919         bool "RCU debugging: don't disable PROVE_RCU on first splat"
920         depends on PROVE_RCU
921         default n
922         help
923          By itself, PROVE_RCU will disable checking upon issuing the
924          first warning (or "splat").  This feature prevents such
925          disabling, allowing multiple RCU-lockdep warnings to be printed
926          on a single reboot.
927
928          Say Y to allow multiple RCU-lockdep warnings per boot.
929
930          Say N if you are unsure.
931
932 config PROVE_RCU_DELAY
933         bool "RCU debugging: preemptible RCU race provocation"
934         depends on DEBUG_KERNEL && PREEMPT_RCU
935         default n
936         help
937          There is a class of races that involve an unlikely preemption
938          of __rcu_read_unlock() just after ->rcu_read_lock_nesting has
939          been set to INT_MIN.  This feature inserts a delay at that
940          point to increase the probability of these races.
941
942          Say Y to increase probability of preemption of __rcu_read_unlock().
943
944          Say N if you are unsure.
945
946 config SPARSE_RCU_POINTER
947         bool "RCU debugging: sparse-based checks for pointer usage"
948         default n
949         help
950          This feature enables the __rcu sparse annotation for
951          RCU-protected pointers.  This annotation will cause sparse
952          to flag any non-RCU used of annotated pointers.  This can be
953          helpful when debugging RCU usage.  Please note that this feature
954          is not intended to enforce code cleanliness; it is instead merely
955          a debugging aid.
956
957          Say Y to make sparse flag questionable use of RCU-protected pointers
958
959          Say N if you are unsure.
960
961 config RCU_TORTURE_TEST
962         tristate "torture tests for RCU"
963         depends on DEBUG_KERNEL
964         default n
965         help
966           This option provides a kernel module that runs torture tests
967           on the RCU infrastructure.  The kernel module may be built
968           after the fact on the running kernel to be tested, if desired.
969
970           Say Y here if you want RCU torture tests to be built into
971           the kernel.
972           Say M if you want the RCU torture tests to build as a module.
973           Say N if you are unsure.
974
975 config RCU_TORTURE_TEST_RUNNABLE
976         bool "torture tests for RCU runnable by default"
977         depends on RCU_TORTURE_TEST = y
978         default n
979         help
980           This option provides a way to build the RCU torture tests
981           directly into the kernel without them starting up at boot
982           time.  You can use /proc/sys/kernel/rcutorture_runnable
983           to manually override this setting.  This /proc file is
984           available only when the RCU torture tests have been built
985           into the kernel.
986
987           Say Y here if you want the RCU torture tests to start during
988           boot (you probably don't).
989           Say N here if you want the RCU torture tests to start only
990           after being manually enabled via /proc.
991
992 config RCU_CPU_STALL_TIMEOUT
993         int "RCU CPU stall timeout in seconds"
994         depends on RCU_STALL_COMMON
995         range 3 300
996         default 21
997         help
998           If a given RCU grace period extends more than the specified
999           number of seconds, a CPU stall warning is printed.  If the
1000           RCU grace period persists, additional CPU stall warnings are
1001           printed at more widely spaced intervals.
1002
1003 config RCU_CPU_STALL_VERBOSE
1004         bool "Print additional per-task information for RCU_CPU_STALL_DETECTOR"
1005         depends on TREE_PREEMPT_RCU
1006         default y
1007         help
1008           This option causes RCU to printk detailed per-task information
1009           for any tasks that are stalling the current RCU grace period.
1010
1011           Say N if you are unsure.
1012
1013           Say Y if you want to enable such checks.
1014
1015 config RCU_CPU_STALL_INFO
1016         bool "Print additional diagnostics on RCU CPU stall"
1017         depends on (TREE_RCU || TREE_PREEMPT_RCU) && DEBUG_KERNEL
1018         default n
1019         help
1020           For each stalled CPU that is aware of the current RCU grace
1021           period, print out additional per-CPU diagnostic information
1022           regarding scheduling-clock ticks, idle state, and,
1023           for RCU_FAST_NO_HZ kernels, idle-entry state.
1024
1025           Say N if you are unsure.
1026
1027           Say Y if you want to enable such diagnostics.
1028
1029 config RCU_TRACE
1030         bool "Enable tracing for RCU"
1031         depends on DEBUG_KERNEL
1032         select TRACE_CLOCK
1033         help
1034           This option provides tracing in RCU which presents stats
1035           in debugfs for debugging RCU implementation.
1036
1037           Say Y here if you want to enable RCU tracing
1038           Say N if you are unsure.
1039
1040 endmenu # "RCU Debugging"
1041
1042 config KPROBES_SANITY_TEST
1043         bool "Kprobes sanity tests"
1044         depends on DEBUG_KERNEL
1045         depends on KPROBES
1046         default n
1047         help
1048           This option provides for testing basic kprobes functionality on
1049           boot. A sample kprobe, jprobe and kretprobe are inserted and
1050           verified for functionality.
1051
1052           Say N if you are unsure.
1053
1054 config BACKTRACE_SELF_TEST
1055         tristate "Self test for the backtrace code"
1056         depends on DEBUG_KERNEL
1057         default n
1058         help
1059           This option provides a kernel module that can be used to test
1060           the kernel stack backtrace code. This option is not useful
1061           for distributions or general kernels, but only for kernel
1062           developers working on architecture code.
1063
1064           Note that if you want to also test saved backtraces, you will
1065           have to enable STACKTRACE as well.
1066
1067           Say N if you are unsure.
1068
1069 config DEBUG_BLOCK_EXT_DEVT
1070         bool "Force extended block device numbers and spread them"
1071         depends on DEBUG_KERNEL
1072         depends on BLOCK
1073         default n
1074         help
1075           BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
1076           SOME DISTRIBUTIONS.  DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
1077           YOU ARE DOING.  Distros, please enable this and fix whatever
1078           is broken.
1079
1080           Conventionally, block device numbers are allocated from
1081           predetermined contiguous area.  However, extended block area
1082           may introduce non-contiguous block device numbers.  This
1083           option forces most block device numbers to be allocated from
1084           the extended space and spreads them to discover kernel or
1085           userland code paths which assume predetermined contiguous
1086           device number allocation.
1087
1088           Note that turning on this debug option shuffles all the
1089           device numbers for all IDE and SCSI devices including libata
1090           ones, so root partition specified using device number
1091           directly (via rdev or root=MAJ:MIN) won't work anymore.
1092           Textual device names (root=/dev/sdXn) will continue to work.
1093
1094           Say N if you are unsure.
1095
1096 config DEBUG_FORCE_WEAK_PER_CPU
1097         bool "Force weak per-cpu definitions"
1098         depends on DEBUG_KERNEL
1099         help
1100           s390 and alpha require percpu variables in modules to be
1101           defined weak to work around addressing range issue which
1102           puts the following two restrictions on percpu variable
1103           definitions.
1104
1105           1. percpu symbols must be unique whether static or not
1106           2. percpu variables can't be defined inside a function
1107
1108           To ensure that generic code follows the above rules, this
1109           option forces all percpu variables to be defined as weak.
1110
1111 config DEBUG_PER_CPU_MAPS
1112         bool "Debug access to per_cpu maps"
1113         depends on DEBUG_KERNEL
1114         depends on SMP
1115         help
1116           Say Y to verify that the per_cpu map being accessed has
1117           been set up. This adds a fair amount of code to kernel memory
1118           and decreases performance.
1119
1120           Say N if unsure.
1121
1122 config LKDTM
1123         tristate "Linux Kernel Dump Test Tool Module"
1124         depends on DEBUG_FS
1125         depends on BLOCK
1126         default n
1127         help
1128         This module enables testing of the different dumping mechanisms by
1129         inducing system failures at predefined crash points.
1130         If you don't need it: say N
1131         Choose M here to compile this code as a module. The module will be
1132         called lkdtm.
1133
1134         Documentation on how to use the module can be found in
1135         Documentation/fault-injection/provoke-crashes.txt
1136
1137 config NOTIFIER_ERROR_INJECTION
1138         tristate "Notifier error injection"
1139         depends on DEBUG_KERNEL
1140         select DEBUG_FS
1141         help
1142           This option provides the ability to inject artificial errors to
1143           specified notifier chain callbacks. It is useful to test the error
1144           handling of notifier call chain failures.
1145
1146           Say N if unsure.
1147
1148 config CPU_NOTIFIER_ERROR_INJECT
1149         tristate "CPU notifier error injection module"
1150         depends on HOTPLUG_CPU && NOTIFIER_ERROR_INJECTION
1151         help
1152           This option provides a kernel module that can be used to test
1153           the error handling of the cpu notifiers by injecting artificial
1154           errors to CPU notifier chain callbacks.  It is controlled through
1155           debugfs interface under /sys/kernel/debug/notifier-error-inject/cpu
1156
1157           If the notifier call chain should be failed with some events
1158           notified, write the error code to "actions/<notifier event>/error".
1159
1160           Example: Inject CPU offline error (-1 == -EPERM)
1161
1162           # cd /sys/kernel/debug/notifier-error-inject/cpu
1163           # echo -1 > actions/CPU_DOWN_PREPARE/error
1164           # echo 0 > /sys/devices/system/cpu/cpu1/online
1165           bash: echo: write error: Operation not permitted
1166
1167           To compile this code as a module, choose M here: the module will
1168           be called cpu-notifier-error-inject.
1169
1170           If unsure, say N.
1171
1172 config PM_NOTIFIER_ERROR_INJECT
1173         tristate "PM notifier error injection module"
1174         depends on PM && NOTIFIER_ERROR_INJECTION
1175         default m if PM_DEBUG
1176         help
1177           This option provides the ability to inject artificial errors to
1178           PM notifier chain callbacks.  It is controlled through debugfs
1179           interface /sys/kernel/debug/notifier-error-inject/pm
1180
1181           If the notifier call chain should be failed with some events
1182           notified, write the error code to "actions/<notifier event>/error".
1183
1184           Example: Inject PM suspend error (-12 = -ENOMEM)
1185
1186           # cd /sys/kernel/debug/notifier-error-inject/pm/
1187           # echo -12 > actions/PM_SUSPEND_PREPARE/error
1188           # echo mem > /sys/power/state
1189           bash: echo: write error: Cannot allocate memory
1190
1191           To compile this code as a module, choose M here: the module will
1192           be called pm-notifier-error-inject.
1193
1194           If unsure, say N.
1195
1196 config MEMORY_NOTIFIER_ERROR_INJECT
1197         tristate "Memory hotplug notifier error injection module"
1198         depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
1199         help
1200           This option provides the ability to inject artificial errors to
1201           memory hotplug notifier chain callbacks.  It is controlled through
1202           debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
1203
1204           If the notifier call chain should be failed with some events
1205           notified, write the error code to "actions/<notifier event>/error".
1206
1207           Example: Inject memory hotplug offline error (-12 == -ENOMEM)
1208
1209           # cd /sys/kernel/debug/notifier-error-inject/memory
1210           # echo -12 > actions/MEM_GOING_OFFLINE/error
1211           # echo offline > /sys/devices/system/memory/memoryXXX/state
1212           bash: echo: write error: Cannot allocate memory
1213
1214           To compile this code as a module, choose M here: the module will
1215           be called memory-notifier-error-inject.
1216
1217           If unsure, say N.
1218
1219 config OF_RECONFIG_NOTIFIER_ERROR_INJECT
1220         tristate "OF reconfig notifier error injection module"
1221         depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
1222         help
1223           This option provides the ability to inject artificial errors to
1224           OF reconfig notifier chain callbacks.  It is controlled
1225           through debugfs interface under
1226           /sys/kernel/debug/notifier-error-inject/OF-reconfig/
1227
1228           If the notifier call chain should be failed with some events
1229           notified, write the error code to "actions/<notifier event>/error".
1230
1231           To compile this code as a module, choose M here: the module will
1232           be called of-reconfig-notifier-error-inject.
1233
1234           If unsure, say N.
1235
1236 config FAULT_INJECTION
1237         bool "Fault-injection framework"
1238         depends on DEBUG_KERNEL
1239         help
1240           Provide fault-injection framework.
1241           For more details, see Documentation/fault-injection/.
1242
1243 config FAILSLAB
1244         bool "Fault-injection capability for kmalloc"
1245         depends on FAULT_INJECTION
1246         depends on SLAB || SLUB
1247         help
1248           Provide fault-injection capability for kmalloc.
1249
1250 config FAIL_PAGE_ALLOC
1251         bool "Fault-injection capabilitiy for alloc_pages()"
1252         depends on FAULT_INJECTION
1253         help
1254           Provide fault-injection capability for alloc_pages().
1255
1256 config FAIL_MAKE_REQUEST
1257         bool "Fault-injection capability for disk IO"
1258         depends on FAULT_INJECTION && BLOCK
1259         help
1260           Provide fault-injection capability for disk IO.
1261
1262 config FAIL_IO_TIMEOUT
1263         bool "Fault-injection capability for faking disk interrupts"
1264         depends on FAULT_INJECTION && BLOCK
1265         help
1266           Provide fault-injection capability on end IO handling. This
1267           will make the block layer "forget" an interrupt as configured,
1268           thus exercising the error handling.
1269
1270           Only works with drivers that use the generic timeout handling,
1271           for others it wont do anything.
1272
1273 config FAIL_MMC_REQUEST
1274         bool "Fault-injection capability for MMC IO"
1275         select DEBUG_FS
1276         depends on FAULT_INJECTION && MMC
1277         help
1278           Provide fault-injection capability for MMC IO.
1279           This will make the mmc core return data errors. This is
1280           useful to test the error handling in the mmc block device
1281           and to test how the mmc host driver handles retries from
1282           the block device.
1283
1284 config FAULT_INJECTION_DEBUG_FS
1285         bool "Debugfs entries for fault-injection capabilities"
1286         depends on FAULT_INJECTION && SYSFS && DEBUG_FS
1287         help
1288           Enable configuration of fault-injection capabilities via debugfs.
1289
1290 config FAULT_INJECTION_STACKTRACE_FILTER
1291         bool "stacktrace filter for fault-injection capabilities"
1292         depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
1293         depends on !X86_64
1294         select STACKTRACE
1295         select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND
1296         help
1297           Provide stacktrace filter for fault-injection capabilities
1298
1299 config LATENCYTOP
1300         bool "Latency measuring infrastructure"
1301         depends on HAVE_LATENCYTOP_SUPPORT
1302         depends on DEBUG_KERNEL
1303         depends on STACKTRACE_SUPPORT
1304         depends on PROC_FS
1305         select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND
1306         select KALLSYMS
1307         select KALLSYMS_ALL
1308         select STACKTRACE
1309         select SCHEDSTATS
1310         select SCHED_DEBUG
1311         help
1312           Enable this option if you want to use the LatencyTOP tool
1313           to find out which userspace is blocking on what kernel operations.
1314
1315 config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
1316         bool
1317
1318 config DEBUG_STRICT_USER_COPY_CHECKS
1319         bool "Strict user copy size checks"
1320         depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
1321         depends on DEBUG_KERNEL && !TRACE_BRANCH_PROFILING
1322         help
1323           Enabling this option turns a certain set of sanity checks for user
1324           copy operations into compile time failures.
1325
1326           The copy_from_user() etc checks are there to help test if there
1327           are sufficient security checks on the length argument of
1328           the copy operation, by having gcc prove that the argument is
1329           within bounds.
1330
1331           If unsure, say N.
1332
1333 source mm/Kconfig.debug
1334 source kernel/trace/Kconfig
1335
1336 config RBTREE_TEST
1337         tristate "Red-Black tree test"
1338         depends on m && DEBUG_KERNEL
1339         help
1340           A benchmark measuring the performance of the rbtree library.
1341           Also includes rbtree invariant checks.
1342
1343 config INTERVAL_TREE_TEST
1344         tristate "Interval tree test"
1345         depends on m && DEBUG_KERNEL
1346         help
1347           A benchmark measuring the performance of the interval tree library
1348
1349 config PROVIDE_OHCI1394_DMA_INIT
1350         bool "Remote debugging over FireWire early on boot"
1351         depends on PCI && X86
1352         help
1353           If you want to debug problems which hang or crash the kernel early
1354           on boot and the crashing machine has a FireWire port, you can use
1355           this feature to remotely access the memory of the crashed machine
1356           over FireWire. This employs remote DMA as part of the OHCI1394
1357           specification which is now the standard for FireWire controllers.
1358
1359           With remote DMA, you can monitor the printk buffer remotely using
1360           firescope and access all memory below 4GB using fireproxy from gdb.
1361           Even controlling a kernel debugger is possible using remote DMA.
1362
1363           Usage:
1364
1365           If ohci1394_dma=early is used as boot parameter, it will initialize
1366           all OHCI1394 controllers which are found in the PCI config space.
1367
1368           As all changes to the FireWire bus such as enabling and disabling
1369           devices cause a bus reset and thereby disable remote DMA for all
1370           devices, be sure to have the cable plugged and FireWire enabled on
1371           the debugging host before booting the debug target for debugging.
1372
1373           This code (~1k) is freed after boot. By then, the firewire stack
1374           in charge of the OHCI-1394 controllers should be used instead.
1375
1376           See Documentation/debugging-via-ohci1394.txt for more information.
1377
1378 config FIREWIRE_OHCI_REMOTE_DMA
1379         bool "Remote debugging over FireWire with firewire-ohci"
1380         depends on FIREWIRE_OHCI
1381         help
1382           This option lets you use the FireWire bus for remote debugging
1383           with help of the firewire-ohci driver. It enables unfiltered
1384           remote DMA in firewire-ohci.
1385           See Documentation/debugging-via-ohci1394.txt for more information.
1386
1387           If unsure, say N.
1388
1389 config BUILD_DOCSRC
1390         bool "Build targets in Documentation/ tree"
1391         depends on HEADERS_CHECK
1392         help
1393           This option attempts to build objects from the source files in the
1394           kernel Documentation/ tree.
1395
1396           Say N if you are unsure.
1397
1398 config DYNAMIC_DEBUG
1399         bool "Enable dynamic printk() support"
1400         default n
1401         depends on PRINTK
1402         depends on DEBUG_FS
1403         help
1404
1405           Compiles debug level messages into the kernel, which would not
1406           otherwise be available at runtime. These messages can then be
1407           enabled/disabled based on various levels of scope - per source file,
1408           function, module, format string, and line number. This mechanism
1409           implicitly compiles in all pr_debug() and dev_dbg() calls, which
1410           enlarges the kernel text size by about 2%.
1411
1412           If a source file is compiled with DEBUG flag set, any
1413           pr_debug() calls in it are enabled by default, but can be
1414           disabled at runtime as below.  Note that DEBUG flag is
1415           turned on by many CONFIG_*DEBUG* options.
1416
1417           Usage:
1418
1419           Dynamic debugging is controlled via the 'dynamic_debug/control' file,
1420           which is contained in the 'debugfs' filesystem. Thus, the debugfs
1421           filesystem must first be mounted before making use of this feature.
1422           We refer the control file as: <debugfs>/dynamic_debug/control. This
1423           file contains a list of the debug statements that can be enabled. The
1424           format for each line of the file is:
1425
1426                 filename:lineno [module]function flags format
1427
1428           filename : source file of the debug statement
1429           lineno : line number of the debug statement
1430           module : module that contains the debug statement
1431           function : function that contains the debug statement
1432           flags : '=p' means the line is turned 'on' for printing
1433           format : the format used for the debug statement
1434
1435           From a live system:
1436
1437                 nullarbor:~ # cat <debugfs>/dynamic_debug/control
1438                 # filename:lineno [module]function flags format
1439                 fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
1440                 fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
1441                 fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
1442
1443           Example usage:
1444
1445                 // enable the message at line 1603 of file svcsock.c
1446                 nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
1447                                                 <debugfs>/dynamic_debug/control
1448
1449                 // enable all the messages in file svcsock.c
1450                 nullarbor:~ # echo -n 'file svcsock.c +p' >
1451                                                 <debugfs>/dynamic_debug/control
1452
1453                 // enable all the messages in the NFS server module
1454                 nullarbor:~ # echo -n 'module nfsd +p' >
1455                                                 <debugfs>/dynamic_debug/control
1456
1457                 // enable all 12 messages in the function svc_process()
1458                 nullarbor:~ # echo -n 'func svc_process +p' >
1459                                                 <debugfs>/dynamic_debug/control
1460
1461                 // disable all 12 messages in the function svc_process()
1462                 nullarbor:~ # echo -n 'func svc_process -p' >
1463                                                 <debugfs>/dynamic_debug/control
1464
1465           See Documentation/dynamic-debug-howto.txt for additional information.
1466
1467 config DMA_API_DEBUG
1468         bool "Enable debugging of DMA-API usage"
1469         depends on HAVE_DMA_API_DEBUG
1470         help
1471           Enable this option to debug the use of the DMA API by device drivers.
1472           With this option you will be able to detect common bugs in device
1473           drivers like double-freeing of DMA mappings or freeing mappings that
1474           were never allocated.
1475           This option causes a performance degredation.  Use only if you want
1476           to debug device drivers. If unsure, say N.
1477
1478 config ATOMIC64_SELFTEST
1479         bool "Perform an atomic64_t self-test at boot"
1480         help
1481           Enable this option to test the atomic64_t functions at boot.
1482
1483           If unsure, say N.
1484
1485 config ASYNC_RAID6_TEST
1486         tristate "Self test for hardware accelerated raid6 recovery"
1487         depends on ASYNC_RAID6_RECOV
1488         select ASYNC_MEMCPY
1489         ---help---
1490           This is a one-shot self test that permutes through the
1491           recovery of all the possible two disk failure scenarios for a
1492           N-disk array.  Recovery is performed with the asynchronous
1493           raid6 recovery routines, and will optionally use an offload
1494           engine if one is available.
1495
1496           If unsure, say N.
1497
1498 source "samples/Kconfig"
1499
1500 source "lib/Kconfig.kgdb"
1501
1502 source "lib/Kconfig.kmemcheck"
1503
1504 config TEST_STRING_HELPERS
1505         tristate "Test functions located in the string_helpers module at runtime"
1506
1507 config TEST_KSTRTOX
1508         tristate "Test kstrto*() family of functions at runtime"