Kconfig.debug 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. config PRINTK_TIME
  2. bool "Show timing information on printks"
  3. help
  4. Selecting this option causes timing information to be
  5. included in printk output. This allows you to measure
  6. the interval between kernel operations, including bootup
  7. operations. This is useful for identifying long delays
  8. in kernel startup.
  9. config ENABLE_MUST_CHECK
  10. bool "Enable __must_check logic"
  11. default y
  12. help
  13. Enable the __must_check logic in the kernel build. Disable this to
  14. suppress the "warning: ignoring return value of 'foo', declared with
  15. attribute warn_unused_result" messages.
  16. config MAGIC_SYSRQ
  17. bool "Magic SysRq key"
  18. depends on !UML
  19. help
  20. If you say Y here, you will have some control over the system even
  21. if the system crashes for example during kernel debugging (e.g., you
  22. will be able to flush the buffer cache to disk, reboot the system
  23. immediately or dump some status information). This is accomplished
  24. by pressing various keys while holding SysRq (Alt+PrintScreen). It
  25. also works on a serial console (on PC hardware at least), if you
  26. send a BREAK and then within 5 seconds a command keypress. The
  27. keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
  28. unless you really know what this hack does.
  29. config UNUSED_SYMBOLS
  30. bool "Enable unused/obsolete exported symbols"
  31. default y if X86
  32. help
  33. Unused but exported symbols make the kernel needlessly bigger. For
  34. that reason most of these unused exports will soon be removed. This
  35. option is provided temporarily to provide a transition period in case
  36. some external kernel module needs one of these symbols anyway. If you
  37. encounter such a case in your module, consider if you are actually
  38. using the right API. (rationale: since nobody in the kernel is using
  39. this in a module, there is a pretty good chance it's actually the
  40. wrong interface to use). If you really need the symbol, please send a
  41. mail to the linux kernel mailing list mentioning the symbol and why
  42. you really need it, and what the merge plan to the mainline kernel for
  43. your module is.
  44. config DEBUG_KERNEL
  45. bool "Kernel debugging"
  46. help
  47. Say Y here if you are developing drivers or trying to debug and
  48. identify kernel problems.
  49. config LOG_BUF_SHIFT
  50. int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL
  51. range 12 21
  52. default 17 if S390 || LOCKDEP
  53. default 16 if X86_NUMAQ || IA64
  54. default 15 if SMP
  55. default 14
  56. help
  57. Select kernel log buffer size as a power of 2.
  58. Defaults and Examples:
  59. 17 => 128 KB for S/390
  60. 16 => 64 KB for x86 NUMAQ or IA-64
  61. 15 => 32 KB for SMP
  62. 14 => 16 KB for uniprocessor
  63. 13 => 8 KB
  64. 12 => 4 KB
  65. config DETECT_SOFTLOCKUP
  66. bool "Detect Soft Lockups"
  67. depends on DEBUG_KERNEL
  68. default y
  69. help
  70. Say Y here to enable the kernel to detect "soft lockups",
  71. which are bugs that cause the kernel to loop in kernel
  72. mode for more than 10 seconds, without giving other tasks a
  73. chance to run.
  74. When a soft-lockup is detected, the kernel will print the
  75. current stack trace (which you should report), but the
  76. system will stay locked up. This feature has negligible
  77. overhead.
  78. (Note that "hard lockups" are separate type of bugs that
  79. can be detected via the NMI-watchdog, on platforms that
  80. support it.)
  81. config SCHEDSTATS
  82. bool "Collect scheduler statistics"
  83. depends on DEBUG_KERNEL && PROC_FS
  84. help
  85. If you say Y here, additional code will be inserted into the
  86. scheduler and related routines to collect statistics about
  87. scheduler behavior and provide them in /proc/schedstat. These
  88. stats may be useful for both tuning and debugging the scheduler
  89. If you aren't debugging the scheduler or trying to tune a specific
  90. application, you can say N to avoid the very slight overhead
  91. this adds.
  92. config DEBUG_SLAB
  93. bool "Debug slab memory allocations"
  94. depends on DEBUG_KERNEL && SLAB
  95. help
  96. Say Y here to have the kernel do limited verification on memory
  97. allocation as well as poisoning memory on free to catch use of freed
  98. memory. This can make kmalloc/kfree-intensive workloads much slower.
  99. config DEBUG_SLAB_LEAK
  100. bool "Memory leak debugging"
  101. depends on DEBUG_SLAB
  102. config DEBUG_PREEMPT
  103. bool "Debug preemptible kernel"
  104. depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
  105. default y
  106. help
  107. If you say Y here then the kernel will use a debug variant of the
  108. commonly used smp_processor_id() function and will print warnings
  109. if kernel code uses it in a preemption-unsafe way. Also, the kernel
  110. will detect preemption count underflows.
  111. config DEBUG_RT_MUTEXES
  112. bool "RT Mutex debugging, deadlock detection"
  113. depends on DEBUG_KERNEL && RT_MUTEXES
  114. help
  115. This allows rt mutex semantics violations and rt mutex related
  116. deadlocks (lockups) to be detected and reported automatically.
  117. config DEBUG_PI_LIST
  118. bool
  119. default y
  120. depends on DEBUG_RT_MUTEXES
  121. config RT_MUTEX_TESTER
  122. bool "Built-in scriptable tester for rt-mutexes"
  123. depends on DEBUG_KERNEL && RT_MUTEXES
  124. help
  125. This option enables a rt-mutex tester.
  126. config DEBUG_SPINLOCK
  127. bool "Spinlock and rw-lock debugging: basic checks"
  128. depends on DEBUG_KERNEL
  129. help
  130. Say Y here and build SMP to catch missing spinlock initialization
  131. and certain other kinds of spinlock errors commonly made. This is
  132. best used in conjunction with the NMI watchdog so that spinlock
  133. deadlocks are also debuggable.
  134. config DEBUG_MUTEXES
  135. bool "Mutex debugging: basic checks"
  136. depends on DEBUG_KERNEL
  137. help
  138. This feature allows mutex semantics violations to be detected and
  139. reported.
  140. config DEBUG_RWSEMS
  141. bool "RW-sem debugging: basic checks"
  142. depends on DEBUG_KERNEL
  143. help
  144. This feature allows read-write semaphore semantics violations to
  145. be detected and reported.
  146. config DEBUG_LOCK_ALLOC
  147. bool "Lock debugging: detect incorrect freeing of live locks"
  148. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  149. select DEBUG_SPINLOCK
  150. select DEBUG_MUTEXES
  151. select DEBUG_RWSEMS
  152. select LOCKDEP
  153. help
  154. This feature will check whether any held lock (spinlock, rwlock,
  155. mutex or rwsem) is incorrectly freed by the kernel, via any of the
  156. memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
  157. vfree(), etc.), whether a live lock is incorrectly reinitialized via
  158. spin_lock_init()/mutex_init()/etc., or whether there is any lock
  159. held during task exit.
  160. config PROVE_LOCKING
  161. bool "Lock debugging: prove locking correctness"
  162. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  163. select LOCKDEP
  164. select DEBUG_SPINLOCK
  165. select DEBUG_MUTEXES
  166. select DEBUG_RWSEMS
  167. select DEBUG_LOCK_ALLOC
  168. default n
  169. help
  170. This feature enables the kernel to prove that all locking
  171. that occurs in the kernel runtime is mathematically
  172. correct: that under no circumstance could an arbitrary (and
  173. not yet triggered) combination of observed locking
  174. sequences (on an arbitrary number of CPUs, running an
  175. arbitrary number of tasks and interrupt contexts) cause a
  176. deadlock.
  177. In short, this feature enables the kernel to report locking
  178. related deadlocks before they actually occur.
  179. The proof does not depend on how hard and complex a
  180. deadlock scenario would be to trigger: how many
  181. participant CPUs, tasks and irq-contexts would be needed
  182. for it to trigger. The proof also does not depend on
  183. timing: if a race and a resulting deadlock is possible
  184. theoretically (no matter how unlikely the race scenario
  185. is), it will be proven so and will immediately be
  186. reported by the kernel (once the event is observed that
  187. makes the deadlock theoretically possible).
  188. If a deadlock is impossible (i.e. the locking rules, as
  189. observed by the kernel, are mathematically correct), the
  190. kernel reports nothing.
  191. NOTE: this feature can also be enabled for rwlocks, mutexes
  192. and rwsems - in which case all dependencies between these
  193. different locking variants are observed and mapped too, and
  194. the proof of observed correctness is also maintained for an
  195. arbitrary combination of these separate locking variants.
  196. For more details, see Documentation/lockdep-design.txt.
  197. config LOCKDEP
  198. bool
  199. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  200. select STACKTRACE
  201. select FRAME_POINTER if !X86
  202. select KALLSYMS
  203. select KALLSYMS_ALL
  204. config DEBUG_LOCKDEP
  205. bool "Lock dependency engine debugging"
  206. depends on DEBUG_KERNEL && LOCKDEP
  207. help
  208. If you say Y here, the lock dependency engine will do
  209. additional runtime checks to debug itself, at the price
  210. of more runtime overhead.
  211. config TRACE_IRQFLAGS
  212. depends on DEBUG_KERNEL
  213. bool
  214. default y
  215. depends on TRACE_IRQFLAGS_SUPPORT
  216. depends on PROVE_LOCKING
  217. config DEBUG_SPINLOCK_SLEEP
  218. bool "Spinlock debugging: sleep-inside-spinlock checking"
  219. depends on DEBUG_KERNEL
  220. help
  221. If you say Y here, various routines which may sleep will become very
  222. noisy if they are called with a spinlock held.
  223. config DEBUG_LOCKING_API_SELFTESTS
  224. bool "Locking API boot-time self-tests"
  225. depends on DEBUG_KERNEL
  226. help
  227. Say Y here if you want the kernel to run a short self-test during
  228. bootup. The self-test checks whether common types of locking bugs
  229. are detected by debugging mechanisms or not. (if you disable
  230. lock debugging then those bugs wont be detected of course.)
  231. The following locking APIs are covered: spinlocks, rwlocks,
  232. mutexes and rwsems.
  233. config STACKTRACE
  234. bool
  235. depends on DEBUG_KERNEL
  236. depends on STACKTRACE_SUPPORT
  237. config DEBUG_KOBJECT
  238. bool "kobject debugging"
  239. depends on DEBUG_KERNEL
  240. help
  241. If you say Y here, some extra kobject debugging messages will be sent
  242. to the syslog.
  243. config DEBUG_HIGHMEM
  244. bool "Highmem debugging"
  245. depends on DEBUG_KERNEL && HIGHMEM
  246. help
  247. This options enables addition error checking for high memory systems.
  248. Disable for production systems.
  249. config DEBUG_BUGVERBOSE
  250. bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
  251. depends on BUG
  252. depends on ARM || ARM26 || AVR32 || M32R || M68K || SPARC32 || SPARC64 || X86_32 || FRV || SUPERH
  253. default !EMBEDDED
  254. help
  255. Say Y here to make BUG() panics output the file name and line number
  256. of the BUG call as well as the EIP and oops trace. This aids
  257. debugging but costs about 70-100K of memory.
  258. config DEBUG_INFO
  259. bool "Compile the kernel with debug info"
  260. depends on DEBUG_KERNEL
  261. help
  262. If you say Y here the resulting kernel image will include
  263. debugging info resulting in a larger kernel image.
  264. Say Y here only if you plan to debug the kernel.
  265. If unsure, say N.
  266. config DEBUG_FS
  267. bool "Debug Filesystem"
  268. depends on SYSFS
  269. help
  270. debugfs is a virtual file system that kernel developers use to put
  271. debugging files into. Enable this option to be able to read and
  272. write to these files.
  273. If unsure, say N.
  274. config DEBUG_VM
  275. bool "Debug VM"
  276. depends on DEBUG_KERNEL
  277. help
  278. Enable this to turn on extended checks in the virtual-memory system
  279. that may impact performance.
  280. If unsure, say N.
  281. config DEBUG_LIST
  282. bool "Debug linked list manipulation"
  283. depends on DEBUG_KERNEL
  284. help
  285. Enable this to turn on extended checks in the linked-list
  286. walking routines.
  287. If unsure, say N.
  288. config FRAME_POINTER
  289. bool "Compile the kernel with frame pointers"
  290. depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH)
  291. default y if DEBUG_INFO && UML
  292. help
  293. If you say Y here the resulting kernel image will be slightly larger
  294. and slower, but it might give very useful debugging information on
  295. some architectures or if you use external debuggers.
  296. If you don't debug the kernel, you can say N.
  297. config UNWIND_INFO
  298. bool "Compile the kernel with frame unwind information"
  299. depends on !IA64 && !PARISC
  300. depends on !MODULES || !(MIPS || PPC || SUPERH || V850)
  301. help
  302. If you say Y here the resulting kernel image will be slightly larger
  303. but not slower, and it will give very useful debugging information.
  304. If you don't debug the kernel, you can say N, but we may not be able
  305. to solve problems without frame unwind information or frame pointers.
  306. config STACK_UNWIND
  307. bool "Stack unwind support"
  308. depends on UNWIND_INFO
  309. depends on X86
  310. help
  311. This enables more precise stack traces, omitting all unrelated
  312. occurrences of pointers into kernel code from the dump.
  313. config FORCED_INLINING
  314. bool "Force gcc to inline functions marked 'inline'"
  315. depends on DEBUG_KERNEL
  316. default y
  317. help
  318. This option determines if the kernel forces gcc to inline the functions
  319. developers have marked 'inline'. Doing so takes away freedom from gcc to
  320. do what it thinks is best, which is desirable for the gcc 3.x series of
  321. compilers. The gcc 4.x series have a rewritten inlining algorithm and
  322. disabling this option will generate a smaller kernel there. Hopefully
  323. this algorithm is so good that allowing gcc4 to make the decision can
  324. become the default in the future, until then this option is there to
  325. test gcc for this.
  326. config RCU_TORTURE_TEST
  327. tristate "torture tests for RCU"
  328. depends on DEBUG_KERNEL
  329. default n
  330. help
  331. This option provides a kernel module that runs torture tests
  332. on the RCU infrastructure. The kernel module may be built
  333. after the fact on the running kernel to be tested, if desired.
  334. Say Y here if you want RCU torture tests to start automatically
  335. at boot time (you probably don't).
  336. Say M if you want the RCU torture tests to build as a module.
  337. Say N if you are unsure.