Kconfig.debug 39 KB

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