Kconfig.debug 34 KB

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