Kconfig.debug 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099
  1. config PRINTK_TIME
  2. bool "Show timing information on printks"
  3. depends on PRINTK
  4. help
  5. Selecting this option causes timing information to be
  6. included in printk output. This allows you to measure
  7. the interval between kernel operations, including bootup
  8. operations. This is useful for identifying long delays
  9. in kernel startup.
  10. config ENABLE_WARN_DEPRECATED
  11. bool "Enable __deprecated logic"
  12. default y
  13. help
  14. Enable the __deprecated logic in the kernel build.
  15. Disable this to suppress the "warning: 'foo' is deprecated
  16. (declared at kernel/power/somefile.c:1234)" messages.
  17. config ENABLE_MUST_CHECK
  18. bool "Enable __must_check logic"
  19. default y
  20. help
  21. Enable the __must_check logic in the kernel build. Disable this to
  22. suppress the "warning: ignoring return value of 'foo', declared with
  23. attribute warn_unused_result" messages.
  24. config FRAME_WARN
  25. int "Warn for stack frames larger than (needs gcc 4.4)"
  26. range 0 8192
  27. default 1024 if !64BIT
  28. default 2048 if 64BIT
  29. help
  30. Tell gcc to warn at build time for stack frames larger than this.
  31. Setting this too low will cause a lot of warnings.
  32. Setting it to 0 disables the warning.
  33. Requires gcc 4.4
  34. config MAGIC_SYSRQ
  35. bool "Magic SysRq key"
  36. depends on !UML
  37. help
  38. If you say Y here, you will have some control over the system even
  39. if the system crashes for example during kernel debugging (e.g., you
  40. will be able to flush the buffer cache to disk, reboot the system
  41. immediately or dump some status information). This is accomplished
  42. by pressing various keys while holding SysRq (Alt+PrintScreen). It
  43. also works on a serial console (on PC hardware at least), if you
  44. send a BREAK and then within 5 seconds a command keypress. The
  45. keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
  46. unless you really know what this hack does.
  47. config STRIP_ASM_SYMS
  48. bool "Strip assembler-generated symbols during link"
  49. default n
  50. help
  51. Strip internal assembler-generated symbols during a link (symbols
  52. that look like '.Lxxx') so they don't pollute the output of
  53. get_wchan() and suchlike.
  54. config UNUSED_SYMBOLS
  55. bool "Enable unused/obsolete exported symbols"
  56. default y if X86
  57. help
  58. Unused but exported symbols make the kernel needlessly bigger. For
  59. that reason most of these unused exports will soon be removed. This
  60. option is provided temporarily to provide a transition period in case
  61. some external kernel module needs one of these symbols anyway. If you
  62. encounter such a case in your module, consider if you are actually
  63. using the right API. (rationale: since nobody in the kernel is using
  64. this in a module, there is a pretty good chance it's actually the
  65. wrong interface to use). If you really need the symbol, please send a
  66. mail to the linux kernel mailing list mentioning the symbol and why
  67. you really need it, and what the merge plan to the mainline kernel for
  68. your module is.
  69. config DEBUG_FS
  70. bool "Debug Filesystem"
  71. depends on SYSFS
  72. help
  73. debugfs is a virtual file system that kernel developers use to put
  74. debugging files into. Enable this option to be able to read and
  75. write to these files.
  76. For detailed documentation on the debugfs API, see
  77. Documentation/DocBook/filesystems.
  78. If unsure, say N.
  79. config HEADERS_CHECK
  80. bool "Run 'make headers_check' when building vmlinux"
  81. depends on !UML
  82. help
  83. This option will extract the user-visible kernel headers whenever
  84. building the kernel, and will run basic sanity checks on them to
  85. ensure that exported files do not attempt to include files which
  86. were not exported, etc.
  87. If you're making modifications to header files which are
  88. relevant for userspace, say 'Y', and check the headers
  89. exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
  90. your build tree), to make sure they're suitable.
  91. config DEBUG_SECTION_MISMATCH
  92. bool "Enable full Section mismatch analysis"
  93. depends on UNDEFINED || (BLACKFIN)
  94. default y
  95. # This option is on purpose disabled for now.
  96. # It will be enabled when we are down to a reasonable number
  97. # of section mismatch warnings (< 10 for an allyesconfig build)
  98. help
  99. The section mismatch analysis checks if there are illegal
  100. references from one section to another section.
  101. Linux will during link or during runtime drop some sections
  102. and any use of code/data previously in these sections will
  103. most likely result in an oops.
  104. In the code functions and variables are annotated with
  105. __init, __devinit etc. (see full list in include/linux/init.h)
  106. which results in the code/data being placed in specific sections.
  107. The section mismatch analysis is always done after a full
  108. kernel build but enabling this option will in addition
  109. do the following:
  110. - Add the option -fno-inline-functions-called-once to gcc
  111. When inlining a function annotated __init in a non-init
  112. function we would lose the section information and thus
  113. the analysis would not catch the illegal reference.
  114. This option tells gcc to inline less but will also
  115. result in a larger kernel.
  116. - Run the section mismatch analysis for each module/built-in.o
  117. When we run the section mismatch analysis on vmlinux.o we
  118. lose valueble information about where the mismatch was
  119. introduced.
  120. Running the analysis for each module/built-in.o file
  121. will tell where the mismatch happens much closer to the
  122. source. The drawback is that we will report the same
  123. mismatch at least twice.
  124. - Enable verbose reporting from modpost to help solving
  125. the section mismatches reported.
  126. config DEBUG_KERNEL
  127. bool "Kernel debugging"
  128. help
  129. Say Y here if you are developing drivers or trying to debug and
  130. identify kernel problems.
  131. config DEBUG_SHIRQ
  132. bool "Debug shared IRQ handlers"
  133. depends on DEBUG_KERNEL && GENERIC_HARDIRQS
  134. help
  135. Enable this to generate a spurious interrupt as soon as a shared
  136. interrupt handler is registered, and just before one is deregistered.
  137. Drivers ought to be able to handle interrupts coming in at those
  138. points; some don't and need to be caught.
  139. config LOCKUP_DETECTOR
  140. bool "Detect Hard and Soft Lockups"
  141. depends on DEBUG_KERNEL && !S390
  142. default y
  143. help
  144. Say Y here to enable the kernel to act as a watchdog to detect
  145. hard and soft lockups.
  146. Softlockups are bugs that cause the kernel to loop in kernel
  147. mode for more than 60 seconds, without giving other tasks a
  148. chance to run. The current stack trace is displayed upon
  149. detection and the system will stay locked up.
  150. Hardlockups are bugs that cause the CPU to loop in kernel mode
  151. for more than 60 seconds, without letting other interrupts have a
  152. chance to run. The current stack trace is displayed upon detection
  153. and the system will stay locked up.
  154. The overhead should be minimal. A periodic hrtimer runs to
  155. generate interrupts and kick the watchdog task every 10-12 seconds.
  156. An NMI is generated every 60 seconds or so to check for hardlockups.
  157. config HARDLOCKUP_DETECTOR
  158. def_bool LOCKUP_DETECTOR && PERF_EVENTS && HAVE_PERF_EVENTS_NMI
  159. config BOOTPARAM_SOFTLOCKUP_PANIC
  160. bool "Panic (Reboot) On Soft Lockups"
  161. depends on LOCKUP_DETECTOR
  162. help
  163. Say Y here to enable the kernel to panic on "soft lockups",
  164. which are bugs that cause the kernel to loop in kernel
  165. mode for more than 60 seconds, without giving other tasks a
  166. chance to run.
  167. The panic can be used in combination with panic_timeout,
  168. to cause the system to reboot automatically after a
  169. lockup has been detected. This feature is useful for
  170. high-availability systems that have uptime guarantees and
  171. where a lockup must be resolved ASAP.
  172. Say N if unsure.
  173. config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
  174. int
  175. depends on LOCKUP_DETECTOR
  176. range 0 1
  177. default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
  178. default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
  179. config DETECT_HUNG_TASK
  180. bool "Detect Hung Tasks"
  181. depends on DEBUG_KERNEL
  182. default DETECT_SOFTLOCKUP
  183. help
  184. Say Y here to enable the kernel to detect "hung tasks",
  185. which are bugs that cause the task to be stuck in
  186. uninterruptible "D" state indefinitiley.
  187. When a hung task is detected, the kernel will print the
  188. current stack trace (which you should report), but the
  189. task will stay in uninterruptible state. If lockdep is
  190. enabled then all held locks will also be reported. This
  191. feature has negligible overhead.
  192. config BOOTPARAM_HUNG_TASK_PANIC
  193. bool "Panic (Reboot) On Hung Tasks"
  194. depends on DETECT_HUNG_TASK
  195. help
  196. Say Y here to enable the kernel to panic on "hung tasks",
  197. which are bugs that cause the kernel to leave a task stuck
  198. in uninterruptible "D" state.
  199. The panic can be used in combination with panic_timeout,
  200. to cause the system to reboot automatically after a
  201. hung task has been detected. This feature is useful for
  202. high-availability systems that have uptime guarantees and
  203. where a hung tasks must be resolved ASAP.
  204. Say N if unsure.
  205. config BOOTPARAM_HUNG_TASK_PANIC_VALUE
  206. int
  207. depends on DETECT_HUNG_TASK
  208. range 0 1
  209. default 0 if !BOOTPARAM_HUNG_TASK_PANIC
  210. default 1 if BOOTPARAM_HUNG_TASK_PANIC
  211. config SCHED_DEBUG
  212. bool "Collect scheduler debugging info"
  213. depends on DEBUG_KERNEL && PROC_FS
  214. default y
  215. help
  216. If you say Y here, the /proc/sched_debug file will be provided
  217. that can help debug the scheduler. The runtime overhead of this
  218. option is minimal.
  219. config SCHEDSTATS
  220. bool "Collect scheduler statistics"
  221. depends on DEBUG_KERNEL && PROC_FS
  222. help
  223. If you say Y here, additional code will be inserted into the
  224. scheduler and related routines to collect statistics about
  225. scheduler behavior and provide them in /proc/schedstat. These
  226. stats may be useful for both tuning and debugging the scheduler
  227. If you aren't debugging the scheduler or trying to tune a specific
  228. application, you can say N to avoid the very slight overhead
  229. this adds.
  230. config TIMER_STATS
  231. bool "Collect kernel timers statistics"
  232. depends on DEBUG_KERNEL && PROC_FS
  233. help
  234. If you say Y here, additional code will be inserted into the
  235. timer routines to collect statistics about kernel timers being
  236. reprogrammed. The statistics can be read from /proc/timer_stats.
  237. The statistics collection is started by writing 1 to /proc/timer_stats,
  238. writing 0 stops it. This feature is useful to collect information
  239. about timer usage patterns in kernel and userspace. This feature
  240. is lightweight if enabled in the kernel config but not activated
  241. (it defaults to deactivated on bootup and will only be activated
  242. if some application like powertop activates it explicitly).
  243. config DEBUG_OBJECTS
  244. bool "Debug object operations"
  245. depends on DEBUG_KERNEL
  246. help
  247. If you say Y here, additional code will be inserted into the
  248. kernel to track the life time of various objects and validate
  249. the operations on those objects.
  250. config DEBUG_OBJECTS_SELFTEST
  251. bool "Debug objects selftest"
  252. depends on DEBUG_OBJECTS
  253. help
  254. This enables the selftest of the object debug code.
  255. config DEBUG_OBJECTS_FREE
  256. bool "Debug objects in freed memory"
  257. depends on DEBUG_OBJECTS
  258. help
  259. This enables checks whether a k/v free operation frees an area
  260. which contains an object which has not been deactivated
  261. properly. This can make kmalloc/kfree-intensive workloads
  262. much slower.
  263. config DEBUG_OBJECTS_TIMERS
  264. bool "Debug timer objects"
  265. depends on DEBUG_OBJECTS
  266. help
  267. If you say Y here, additional code will be inserted into the
  268. timer routines to track the life time of timer objects and
  269. validate the timer operations.
  270. config DEBUG_OBJECTS_WORK
  271. bool "Debug work objects"
  272. depends on DEBUG_OBJECTS
  273. help
  274. If you say Y here, additional code will be inserted into the
  275. work queue routines to track the life time of work objects and
  276. validate the work operations.
  277. config DEBUG_OBJECTS_ENABLE_DEFAULT
  278. int "debug_objects bootup default value (0-1)"
  279. range 0 1
  280. default "1"
  281. depends on DEBUG_OBJECTS
  282. help
  283. Debug objects boot parameter default value
  284. config DEBUG_SLAB
  285. bool "Debug slab memory allocations"
  286. depends on DEBUG_KERNEL && SLAB && !KMEMCHECK
  287. help
  288. Say Y here to have the kernel do limited verification on memory
  289. allocation as well as poisoning memory on free to catch use of freed
  290. memory. This can make kmalloc/kfree-intensive workloads much slower.
  291. config DEBUG_SLAB_LEAK
  292. bool "Memory leak debugging"
  293. depends on DEBUG_SLAB
  294. config SLUB_DEBUG_ON
  295. bool "SLUB debugging on by default"
  296. depends on SLUB && SLUB_DEBUG && !KMEMCHECK
  297. default n
  298. help
  299. Boot with debugging on by default. SLUB boots by default with
  300. the runtime debug capabilities switched off. Enabling this is
  301. equivalent to specifying the "slub_debug" parameter on boot.
  302. There is no support for more fine grained debug control like
  303. possible with slub_debug=xxx. SLUB debugging may be switched
  304. off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
  305. "slub_debug=-".
  306. config SLUB_STATS
  307. default n
  308. bool "Enable SLUB performance statistics"
  309. depends on SLUB && SLUB_DEBUG && SYSFS
  310. help
  311. SLUB statistics are useful to debug SLUBs allocation behavior in
  312. order find ways to optimize the allocator. This should never be
  313. enabled for production use since keeping statistics slows down
  314. the allocator by a few percentage points. The slabinfo command
  315. supports the determination of the most active slabs to figure
  316. out which slabs are relevant to a particular load.
  317. Try running: slabinfo -DA
  318. config DEBUG_KMEMLEAK
  319. bool "Kernel memory leak detector"
  320. depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \
  321. (X86 || ARM || PPC || S390 || SPARC64 || SUPERH || MICROBLAZE)
  322. select DEBUG_FS if SYSFS
  323. select STACKTRACE if STACKTRACE_SUPPORT
  324. select KALLSYMS
  325. select CRC32
  326. help
  327. Say Y here if you want to enable the memory leak
  328. detector. The memory allocation/freeing is traced in a way
  329. similar to the Boehm's conservative garbage collector, the
  330. difference being that the orphan objects are not freed but
  331. only shown in /sys/kernel/debug/kmemleak. Enabling this
  332. feature will introduce an overhead to memory
  333. allocations. See Documentation/kmemleak.txt for more
  334. details.
  335. Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
  336. of finding leaks due to the slab objects poisoning.
  337. In order to access the kmemleak file, debugfs needs to be
  338. mounted (usually at /sys/kernel/debug).
  339. config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
  340. int "Maximum kmemleak early log entries"
  341. depends on DEBUG_KMEMLEAK
  342. range 200 40000
  343. default 400
  344. help
  345. Kmemleak must track all the memory allocations to avoid
  346. reporting false positives. Since memory may be allocated or
  347. freed before kmemleak is initialised, an early log buffer is
  348. used to store these actions. If kmemleak reports "early log
  349. buffer exceeded", please increase this value.
  350. config DEBUG_KMEMLEAK_TEST
  351. tristate "Simple test for the kernel memory leak detector"
  352. depends on DEBUG_KMEMLEAK
  353. help
  354. Say Y or M here to build a test for the kernel memory leak
  355. detector. This option enables a module that explicitly leaks
  356. memory.
  357. If unsure, say N.
  358. config DEBUG_PREEMPT
  359. bool "Debug preemptible kernel"
  360. depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
  361. default y
  362. help
  363. If you say Y here then the kernel will use a debug variant of the
  364. commonly used smp_processor_id() function and will print warnings
  365. if kernel code uses it in a preemption-unsafe way. Also, the kernel
  366. will detect preemption count underflows.
  367. config DEBUG_RT_MUTEXES
  368. bool "RT Mutex debugging, deadlock detection"
  369. depends on DEBUG_KERNEL && RT_MUTEXES
  370. help
  371. This allows rt mutex semantics violations and rt mutex related
  372. deadlocks (lockups) to be detected and reported automatically.
  373. config DEBUG_PI_LIST
  374. bool
  375. default y
  376. depends on DEBUG_RT_MUTEXES
  377. config RT_MUTEX_TESTER
  378. bool "Built-in scriptable tester for rt-mutexes"
  379. depends on DEBUG_KERNEL && RT_MUTEXES
  380. help
  381. This option enables a rt-mutex tester.
  382. config DEBUG_SPINLOCK
  383. bool "Spinlock and rw-lock debugging: basic checks"
  384. depends on DEBUG_KERNEL
  385. help
  386. Say Y here and build SMP to catch missing spinlock initialization
  387. and certain other kinds of spinlock errors commonly made. This is
  388. best used in conjunction with the NMI watchdog so that spinlock
  389. deadlocks are also debuggable.
  390. config DEBUG_MUTEXES
  391. bool "Mutex debugging: basic checks"
  392. depends on DEBUG_KERNEL
  393. help
  394. This feature allows mutex semantics violations to be detected and
  395. reported.
  396. config DEBUG_LOCK_ALLOC
  397. bool "Lock debugging: detect incorrect freeing of live locks"
  398. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  399. select DEBUG_SPINLOCK
  400. select DEBUG_MUTEXES
  401. select LOCKDEP
  402. help
  403. This feature will check whether any held lock (spinlock, rwlock,
  404. mutex or rwsem) is incorrectly freed by the kernel, via any of the
  405. memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
  406. vfree(), etc.), whether a live lock is incorrectly reinitialized via
  407. spin_lock_init()/mutex_init()/etc., or whether there is any lock
  408. held during task exit.
  409. config PROVE_LOCKING
  410. bool "Lock debugging: prove locking correctness"
  411. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  412. select LOCKDEP
  413. select DEBUG_SPINLOCK
  414. select DEBUG_MUTEXES
  415. select DEBUG_LOCK_ALLOC
  416. default n
  417. help
  418. This feature enables the kernel to prove that all locking
  419. that occurs in the kernel runtime is mathematically
  420. correct: that under no circumstance could an arbitrary (and
  421. not yet triggered) combination of observed locking
  422. sequences (on an arbitrary number of CPUs, running an
  423. arbitrary number of tasks and interrupt contexts) cause a
  424. deadlock.
  425. In short, this feature enables the kernel to report locking
  426. related deadlocks before they actually occur.
  427. The proof does not depend on how hard and complex a
  428. deadlock scenario would be to trigger: how many
  429. participant CPUs, tasks and irq-contexts would be needed
  430. for it to trigger. The proof also does not depend on
  431. timing: if a race and a resulting deadlock is possible
  432. theoretically (no matter how unlikely the race scenario
  433. is), it will be proven so and will immediately be
  434. reported by the kernel (once the event is observed that
  435. makes the deadlock theoretically possible).
  436. If a deadlock is impossible (i.e. the locking rules, as
  437. observed by the kernel, are mathematically correct), the
  438. kernel reports nothing.
  439. NOTE: this feature can also be enabled for rwlocks, mutexes
  440. and rwsems - in which case all dependencies between these
  441. different locking variants are observed and mapped too, and
  442. the proof of observed correctness is also maintained for an
  443. arbitrary combination of these separate locking variants.
  444. For more details, see Documentation/lockdep-design.txt.
  445. config PROVE_RCU
  446. bool "RCU debugging: prove RCU correctness"
  447. depends on PROVE_LOCKING
  448. default n
  449. help
  450. This feature enables lockdep extensions that check for correct
  451. use of RCU APIs. This is currently under development. Say Y
  452. if you want to debug RCU usage or help work on the PROVE_RCU
  453. feature.
  454. Say N if you are unsure.
  455. config LOCKDEP
  456. bool
  457. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  458. select STACKTRACE
  459. select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390
  460. select KALLSYMS
  461. select KALLSYMS_ALL
  462. config LOCK_STAT
  463. bool "Lock usage statistics"
  464. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  465. select LOCKDEP
  466. select DEBUG_SPINLOCK
  467. select DEBUG_MUTEXES
  468. select DEBUG_LOCK_ALLOC
  469. default n
  470. help
  471. This feature enables tracking lock contention points
  472. For more details, see Documentation/lockstat.txt
  473. This also enables lock events required by "perf lock",
  474. subcommand of perf.
  475. If you want to use "perf lock", you also need to turn on
  476. CONFIG_EVENT_TRACING.
  477. CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
  478. (CONFIG_LOCKDEP defines "acquire" and "release" events.)
  479. config DEBUG_LOCKDEP
  480. bool "Lock dependency engine debugging"
  481. depends on DEBUG_KERNEL && LOCKDEP
  482. help
  483. If you say Y here, the lock dependency engine will do
  484. additional runtime checks to debug itself, at the price
  485. of more runtime overhead.
  486. config TRACE_IRQFLAGS
  487. depends on DEBUG_KERNEL
  488. bool
  489. default y
  490. depends on TRACE_IRQFLAGS_SUPPORT
  491. depends on PROVE_LOCKING
  492. config DEBUG_SPINLOCK_SLEEP
  493. bool "Spinlock debugging: sleep-inside-spinlock checking"
  494. depends on DEBUG_KERNEL
  495. help
  496. If you say Y here, various routines which may sleep will become very
  497. noisy if they are called with a spinlock held.
  498. config DEBUG_LOCKING_API_SELFTESTS
  499. bool "Locking API boot-time self-tests"
  500. depends on DEBUG_KERNEL
  501. help
  502. Say Y here if you want the kernel to run a short self-test during
  503. bootup. The self-test checks whether common types of locking bugs
  504. are detected by debugging mechanisms or not. (if you disable
  505. lock debugging then those bugs wont be detected of course.)
  506. The following locking APIs are covered: spinlocks, rwlocks,
  507. mutexes and rwsems.
  508. config STACKTRACE
  509. bool
  510. depends on STACKTRACE_SUPPORT
  511. config DEBUG_KOBJECT
  512. bool "kobject debugging"
  513. depends on DEBUG_KERNEL
  514. help
  515. If you say Y here, some extra kobject debugging messages will be sent
  516. to the syslog.
  517. config DEBUG_HIGHMEM
  518. bool "Highmem debugging"
  519. depends on DEBUG_KERNEL && HIGHMEM
  520. help
  521. This options enables addition error checking for high memory systems.
  522. Disable for production systems.
  523. config DEBUG_BUGVERBOSE
  524. bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
  525. depends on BUG
  526. depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || \
  527. FRV || SUPERH || GENERIC_BUG || BLACKFIN || MN10300
  528. default y
  529. help
  530. Say Y here to make BUG() panics output the file name and line number
  531. of the BUG call as well as the EIP and oops trace. This aids
  532. debugging but costs about 70-100K of memory.
  533. config DEBUG_INFO
  534. bool "Compile the kernel with debug info"
  535. depends on DEBUG_KERNEL
  536. help
  537. If you say Y here the resulting kernel image will include
  538. debugging info resulting in a larger kernel image.
  539. This adds debug symbols to the kernel and modules (gcc -g), and
  540. is needed if you intend to use kernel crashdump or binary object
  541. tools like crash, kgdb, LKCD, gdb, etc on the kernel.
  542. Say Y here only if you plan to debug the kernel.
  543. If unsure, say N.
  544. config DEBUG_VM
  545. bool "Debug VM"
  546. depends on DEBUG_KERNEL
  547. help
  548. Enable this to turn on extended checks in the virtual-memory system
  549. that may impact performance.
  550. If unsure, say N.
  551. config DEBUG_VIRTUAL
  552. bool "Debug VM translations"
  553. depends on DEBUG_KERNEL && X86
  554. help
  555. Enable some costly sanity checks in virtual to page code. This can
  556. catch mistakes with virt_to_page() and friends.
  557. If unsure, say N.
  558. config DEBUG_NOMMU_REGIONS
  559. bool "Debug the global anon/private NOMMU mapping region tree"
  560. depends on DEBUG_KERNEL && !MMU
  561. help
  562. This option causes the global tree of anonymous and private mapping
  563. regions to be regularly checked for invalid topology.
  564. config DEBUG_WRITECOUNT
  565. bool "Debug filesystem writers count"
  566. depends on DEBUG_KERNEL
  567. help
  568. Enable this to catch wrong use of the writers count in struct
  569. vfsmount. This will increase the size of each file struct by
  570. 32 bits.
  571. If unsure, say N.
  572. config DEBUG_MEMORY_INIT
  573. bool "Debug memory initialisation" if EMBEDDED
  574. default !EMBEDDED
  575. help
  576. Enable this for additional checks during memory initialisation.
  577. The sanity checks verify aspects of the VM such as the memory model
  578. and other information provided by the architecture. Verbose
  579. information will be printed at KERN_DEBUG loglevel depending
  580. on the mminit_loglevel= command-line option.
  581. If unsure, say Y
  582. config DEBUG_LIST
  583. bool "Debug linked list manipulation"
  584. depends on DEBUG_KERNEL
  585. help
  586. Enable this to turn on extended checks in the linked-list
  587. walking routines.
  588. If unsure, say N.
  589. config DEBUG_SG
  590. bool "Debug SG table operations"
  591. depends on DEBUG_KERNEL
  592. help
  593. Enable this to turn on checks on scatter-gather tables. This can
  594. help find problems with drivers that do not properly initialize
  595. their sg tables.
  596. If unsure, say N.
  597. config DEBUG_NOTIFIERS
  598. bool "Debug notifier call chains"
  599. depends on DEBUG_KERNEL
  600. help
  601. Enable this to turn on sanity checking for notifier call chains.
  602. This is most useful for kernel developers to make sure that
  603. modules properly unregister themselves from notifier chains.
  604. This is a relatively cheap check but if you care about maximum
  605. performance, say N.
  606. config DEBUG_CREDENTIALS
  607. bool "Debug credential management"
  608. depends on DEBUG_KERNEL
  609. help
  610. Enable this to turn on some debug checking for credential
  611. management. The additional code keeps track of the number of
  612. pointers from task_structs to any given cred struct, and checks to
  613. see that this number never exceeds the usage count of the cred
  614. struct.
  615. Furthermore, if SELinux is enabled, this also checks that the
  616. security pointer in the cred struct is never seen to be invalid.
  617. If unsure, say N.
  618. #
  619. # Select this config option from the architecture Kconfig, if it
  620. # it is preferred to always offer frame pointers as a config
  621. # option on the architecture (regardless of KERNEL_DEBUG):
  622. #
  623. config ARCH_WANT_FRAME_POINTERS
  624. bool
  625. help
  626. config FRAME_POINTER
  627. bool "Compile the kernel with frame pointers"
  628. depends on DEBUG_KERNEL && \
  629. (CRIS || M68K || M68KNOMMU || FRV || UML || \
  630. AVR32 || SUPERH || BLACKFIN || MN10300) || \
  631. ARCH_WANT_FRAME_POINTERS
  632. default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
  633. help
  634. If you say Y here the resulting kernel image will be slightly
  635. larger and slower, but it gives very useful debugging information
  636. in case of kernel bugs. (precise oopses/stacktraces/warnings)
  637. config BOOT_PRINTK_DELAY
  638. bool "Delay each boot printk message by N milliseconds"
  639. depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
  640. help
  641. This build option allows you to read kernel boot messages
  642. by inserting a short delay after each one. The delay is
  643. specified in milliseconds on the kernel command line,
  644. using "boot_delay=N".
  645. It is likely that you would also need to use "lpj=M" to preset
  646. the "loops per jiffie" value.
  647. See a previous boot log for the "lpj" value to use for your
  648. system, and then set "lpj=M" before setting "boot_delay=N".
  649. NOTE: Using this option may adversely affect SMP systems.
  650. I.e., processors other than the first one may not boot up.
  651. BOOT_PRINTK_DELAY also may cause DETECT_SOFTLOCKUP to detect
  652. what it believes to be lockup conditions.
  653. config RCU_TORTURE_TEST
  654. tristate "torture tests for RCU"
  655. depends on DEBUG_KERNEL
  656. default n
  657. help
  658. This option provides a kernel module that runs torture tests
  659. on the RCU infrastructure. The kernel module may be built
  660. after the fact on the running kernel to be tested, if desired.
  661. Say Y here if you want RCU torture tests to be built into
  662. the kernel.
  663. Say M if you want the RCU torture tests to build as a module.
  664. Say N if you are unsure.
  665. config RCU_TORTURE_TEST_RUNNABLE
  666. bool "torture tests for RCU runnable by default"
  667. depends on RCU_TORTURE_TEST = y
  668. default n
  669. help
  670. This option provides a way to build the RCU torture tests
  671. directly into the kernel without them starting up at boot
  672. time. You can use /proc/sys/kernel/rcutorture_runnable
  673. to manually override this setting. This /proc file is
  674. available only when the RCU torture tests have been built
  675. into the kernel.
  676. Say Y here if you want the RCU torture tests to start during
  677. boot (you probably don't).
  678. Say N here if you want the RCU torture tests to start only
  679. after being manually enabled via /proc.
  680. config RCU_CPU_STALL_DETECTOR
  681. bool "Check for stalled CPUs delaying RCU grace periods"
  682. depends on TREE_RCU || TREE_PREEMPT_RCU
  683. default y
  684. help
  685. This option causes RCU to printk information on which
  686. CPUs are delaying the current grace period, but only when
  687. the grace period extends for excessive time periods.
  688. Say N if you want to disable such checks.
  689. Say Y if you are unsure.
  690. config RCU_CPU_STALL_VERBOSE
  691. bool "Print additional per-task information for RCU_CPU_STALL_DETECTOR"
  692. depends on RCU_CPU_STALL_DETECTOR && TREE_PREEMPT_RCU
  693. default n
  694. help
  695. This option causes RCU to printk detailed per-task information
  696. for any tasks that are stalling the current RCU grace period.
  697. Say N if you are unsure.
  698. Say Y if you want to enable such checks.
  699. config KPROBES_SANITY_TEST
  700. bool "Kprobes sanity tests"
  701. depends on DEBUG_KERNEL
  702. depends on KPROBES
  703. default n
  704. help
  705. This option provides for testing basic kprobes functionality on
  706. boot. A sample kprobe, jprobe and kretprobe are inserted and
  707. verified for functionality.
  708. Say N if you are unsure.
  709. config BACKTRACE_SELF_TEST
  710. tristate "Self test for the backtrace code"
  711. depends on DEBUG_KERNEL
  712. default n
  713. help
  714. This option provides a kernel module that can be used to test
  715. the kernel stack backtrace code. This option is not useful
  716. for distributions or general kernels, but only for kernel
  717. developers working on architecture code.
  718. Note that if you want to also test saved backtraces, you will
  719. have to enable STACKTRACE as well.
  720. Say N if you are unsure.
  721. config DEBUG_BLOCK_EXT_DEVT
  722. bool "Force extended block device numbers and spread them"
  723. depends on DEBUG_KERNEL
  724. depends on BLOCK
  725. default n
  726. help
  727. BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
  728. SOME DISTRIBUTIONS. DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
  729. YOU ARE DOING. Distros, please enable this and fix whatever
  730. is broken.
  731. Conventionally, block device numbers are allocated from
  732. predetermined contiguous area. However, extended block area
  733. may introduce non-contiguous block device numbers. This
  734. option forces most block device numbers to be allocated from
  735. the extended space and spreads them to discover kernel or
  736. userland code paths which assume predetermined contiguous
  737. device number allocation.
  738. Note that turning on this debug option shuffles all the
  739. device numbers for all IDE and SCSI devices including libata
  740. ones, so root partition specified using device number
  741. directly (via rdev or root=MAJ:MIN) won't work anymore.
  742. Textual device names (root=/dev/sdXn) will continue to work.
  743. Say N if you are unsure.
  744. config DEBUG_FORCE_WEAK_PER_CPU
  745. bool "Force weak per-cpu definitions"
  746. depends on DEBUG_KERNEL
  747. help
  748. s390 and alpha require percpu variables in modules to be
  749. defined weak to work around addressing range issue which
  750. puts the following two restrictions on percpu variable
  751. definitions.
  752. 1. percpu symbols must be unique whether static or not
  753. 2. percpu variables can't be defined inside a function
  754. To ensure that generic code follows the above rules, this
  755. option forces all percpu variables to be defined as weak.
  756. config LKDTM
  757. tristate "Linux Kernel Dump Test Tool Module"
  758. depends on DEBUG_FS
  759. depends on BLOCK
  760. default n
  761. help
  762. This module enables testing of the different dumping mechanisms by
  763. inducing system failures at predefined crash points.
  764. If you don't need it: say N
  765. Choose M here to compile this code as a module. The module will be
  766. called lkdtm.
  767. Documentation on how to use the module can be found in
  768. Documentation/fault-injection/provoke-crashes.txt
  769. config FAULT_INJECTION
  770. bool "Fault-injection framework"
  771. depends on DEBUG_KERNEL
  772. help
  773. Provide fault-injection framework.
  774. For more details, see Documentation/fault-injection/.
  775. config FAILSLAB
  776. bool "Fault-injection capability for kmalloc"
  777. depends on FAULT_INJECTION
  778. depends on SLAB || SLUB
  779. help
  780. Provide fault-injection capability for kmalloc.
  781. config FAIL_PAGE_ALLOC
  782. bool "Fault-injection capabilitiy for alloc_pages()"
  783. depends on FAULT_INJECTION
  784. help
  785. Provide fault-injection capability for alloc_pages().
  786. config FAIL_MAKE_REQUEST
  787. bool "Fault-injection capability for disk IO"
  788. depends on FAULT_INJECTION && BLOCK
  789. help
  790. Provide fault-injection capability for disk IO.
  791. config FAIL_IO_TIMEOUT
  792. bool "Faul-injection capability for faking disk interrupts"
  793. depends on FAULT_INJECTION && BLOCK
  794. help
  795. Provide fault-injection capability on end IO handling. This
  796. will make the block layer "forget" an interrupt as configured,
  797. thus exercising the error handling.
  798. Only works with drivers that use the generic timeout handling,
  799. for others it wont do anything.
  800. config FAULT_INJECTION_DEBUG_FS
  801. bool "Debugfs entries for fault-injection capabilities"
  802. depends on FAULT_INJECTION && SYSFS && DEBUG_FS
  803. help
  804. Enable configuration of fault-injection capabilities via debugfs.
  805. config FAULT_INJECTION_STACKTRACE_FILTER
  806. bool "stacktrace filter for fault-injection capabilities"
  807. depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
  808. depends on !X86_64
  809. select STACKTRACE
  810. select FRAME_POINTER if !PPC && !S390
  811. help
  812. Provide stacktrace filter for fault-injection capabilities
  813. config LATENCYTOP
  814. bool "Latency measuring infrastructure"
  815. select FRAME_POINTER if !MIPS && !PPC && !S390
  816. select KALLSYMS
  817. select KALLSYMS_ALL
  818. select STACKTRACE
  819. select SCHEDSTATS
  820. select SCHED_DEBUG
  821. depends on HAVE_LATENCYTOP_SUPPORT
  822. help
  823. Enable this option if you want to use the LatencyTOP tool
  824. to find out which userspace is blocking on what kernel operations.
  825. config SYSCTL_SYSCALL_CHECK
  826. bool "Sysctl checks"
  827. depends on SYSCTL
  828. ---help---
  829. sys_sysctl uses binary paths that have been found challenging
  830. to properly maintain and use. This enables checks that help
  831. you to keep things correct.
  832. source mm/Kconfig.debug
  833. source kernel/trace/Kconfig
  834. config PROVIDE_OHCI1394_DMA_INIT
  835. bool "Remote debugging over FireWire early on boot"
  836. depends on PCI && X86
  837. help
  838. If you want to debug problems which hang or crash the kernel early
  839. on boot and the crashing machine has a FireWire port, you can use
  840. this feature to remotely access the memory of the crashed machine
  841. over FireWire. This employs remote DMA as part of the OHCI1394
  842. specification which is now the standard for FireWire controllers.
  843. With remote DMA, you can monitor the printk buffer remotely using
  844. firescope and access all memory below 4GB using fireproxy from gdb.
  845. Even controlling a kernel debugger is possible using remote DMA.
  846. Usage:
  847. If ohci1394_dma=early is used as boot parameter, it will initialize
  848. all OHCI1394 controllers which are found in the PCI config space.
  849. As all changes to the FireWire bus such as enabling and disabling
  850. devices cause a bus reset and thereby disable remote DMA for all
  851. devices, be sure to have the cable plugged and FireWire enabled on
  852. the debugging host before booting the debug target for debugging.
  853. This code (~1k) is freed after boot. By then, the firewire stack
  854. in charge of the OHCI-1394 controllers should be used instead.
  855. See Documentation/debugging-via-ohci1394.txt for more information.
  856. config FIREWIRE_OHCI_REMOTE_DMA
  857. bool "Remote debugging over FireWire with firewire-ohci"
  858. depends on FIREWIRE_OHCI
  859. help
  860. This option lets you use the FireWire bus for remote debugging
  861. with help of the firewire-ohci driver. It enables unfiltered
  862. remote DMA in firewire-ohci.
  863. See Documentation/debugging-via-ohci1394.txt for more information.
  864. If unsure, say N.
  865. config BUILD_DOCSRC
  866. bool "Build targets in Documentation/ tree"
  867. depends on HEADERS_CHECK
  868. help
  869. This option attempts to build objects from the source files in the
  870. kernel Documentation/ tree.
  871. Say N if you are unsure.
  872. config DYNAMIC_DEBUG
  873. bool "Enable dynamic printk() support"
  874. default n
  875. depends on PRINTK
  876. depends on DEBUG_FS
  877. help
  878. Compiles debug level messages into the kernel, which would not
  879. otherwise be available at runtime. These messages can then be
  880. enabled/disabled based on various levels of scope - per source file,
  881. function, module, format string, and line number. This mechanism
  882. implicitly enables all pr_debug() and dev_dbg() calls. The impact of
  883. this compile option is a larger kernel text size of about 2%.
  884. Usage:
  885. Dynamic debugging is controlled via the 'dynamic_debug/ddebug' file,
  886. which is contained in the 'debugfs' filesystem. Thus, the debugfs
  887. filesystem must first be mounted before making use of this feature.
  888. We refer the control file as: <debugfs>/dynamic_debug/ddebug. This
  889. file contains a list of the debug statements that can be enabled. The
  890. format for each line of the file is:
  891. filename:lineno [module]function flags format
  892. filename : source file of the debug statement
  893. lineno : line number of the debug statement
  894. module : module that contains the debug statement
  895. function : function that contains the debug statement
  896. flags : 'p' means the line is turned 'on' for printing
  897. format : the format used for the debug statement
  898. From a live system:
  899. nullarbor:~ # cat <debugfs>/dynamic_debug/ddebug
  900. # filename:lineno [module]function flags format
  901. fs/aio.c:222 [aio]__put_ioctx - "__put_ioctx:\040freeing\040%p\012"
  902. fs/aio.c:248 [aio]ioctx_alloc - "ENOMEM:\040nr_events\040too\040high\012"
  903. fs/aio.c:1770 [aio]sys_io_cancel - "calling\040cancel\012"
  904. Example usage:
  905. // enable the message at line 1603 of file svcsock.c
  906. nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
  907. <debugfs>/dynamic_debug/ddebug
  908. // enable all the messages in file svcsock.c
  909. nullarbor:~ # echo -n 'file svcsock.c +p' >
  910. <debugfs>/dynamic_debug/ddebug
  911. // enable all the messages in the NFS server module
  912. nullarbor:~ # echo -n 'module nfsd +p' >
  913. <debugfs>/dynamic_debug/ddebug
  914. // enable all 12 messages in the function svc_process()
  915. nullarbor:~ # echo -n 'func svc_process +p' >
  916. <debugfs>/dynamic_debug/ddebug
  917. // disable all 12 messages in the function svc_process()
  918. nullarbor:~ # echo -n 'func svc_process -p' >
  919. <debugfs>/dynamic_debug/ddebug
  920. See Documentation/dynamic-debug-howto.txt for additional information.
  921. config DMA_API_DEBUG
  922. bool "Enable debugging of DMA-API usage"
  923. depends on HAVE_DMA_API_DEBUG
  924. help
  925. Enable this option to debug the use of the DMA API by device drivers.
  926. With this option you will be able to detect common bugs in device
  927. drivers like double-freeing of DMA mappings or freeing mappings that
  928. were never allocated.
  929. This option causes a performance degredation. Use only if you want
  930. to debug device drivers. If unsure, say N.
  931. source "samples/Kconfig"
  932. source "lib/Kconfig.kgdb"
  933. source "lib/Kconfig.kmemcheck"