Kconfig.debug 37 KB

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