Kconfig.debug 37 KB

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