Kconfig.debug 40 KB

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