Kconfig.debug 13 KB

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