Kconfig.debug 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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 DEBUG_KERNEL
  23. bool "Kernel debugging"
  24. help
  25. Say Y here if you are developing drivers or trying to debug and
  26. identify kernel problems.
  27. config LOG_BUF_SHIFT
  28. int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL
  29. range 12 21
  30. default 17 if S390
  31. default 16 if X86_NUMAQ || IA64
  32. default 15 if SMP
  33. default 14
  34. help
  35. Select kernel log buffer size as a power of 2.
  36. Defaults and Examples:
  37. 17 => 128 KB for S/390
  38. 16 => 64 KB for x86 NUMAQ or IA-64
  39. 15 => 32 KB for SMP
  40. 14 => 16 KB for uniprocessor
  41. 13 => 8 KB
  42. 12 => 4 KB
  43. config DETECT_SOFTLOCKUP
  44. bool "Detect Soft Lockups"
  45. depends on DEBUG_KERNEL
  46. default y
  47. help
  48. Say Y here to enable the kernel to detect "soft lockups",
  49. which are bugs that cause the kernel to loop in kernel
  50. mode for more than 10 seconds, without giving other tasks a
  51. chance to run.
  52. When a soft-lockup is detected, the kernel will print the
  53. current stack trace (which you should report), but the
  54. system will stay locked up. This feature has negligible
  55. overhead.
  56. (Note that "hard lockups" are separate type of bugs that
  57. can be detected via the NMI-watchdog, on platforms that
  58. support it.)
  59. config SCHEDSTATS
  60. bool "Collect scheduler statistics"
  61. depends on DEBUG_KERNEL && PROC_FS
  62. help
  63. If you say Y here, additional code will be inserted into the
  64. scheduler and related routines to collect statistics about
  65. scheduler behavior and provide them in /proc/schedstat. These
  66. stats may be useful for both tuning and debugging the scheduler
  67. If you aren't debugging the scheduler or trying to tune a specific
  68. application, you can say N to avoid the very slight overhead
  69. this adds.
  70. config DEBUG_SLAB
  71. bool "Debug memory allocations"
  72. depends on DEBUG_KERNEL && SLAB
  73. help
  74. Say Y here to have the kernel do limited verification on memory
  75. allocation as well as poisoning memory on free to catch use of freed
  76. memory. This can make kmalloc/kfree-intensive workloads much slower.
  77. config DEBUG_PREEMPT
  78. bool "Debug preemptible kernel"
  79. depends on DEBUG_KERNEL && PREEMPT
  80. default y
  81. help
  82. If you say Y here then the kernel will use a debug variant of the
  83. commonly used smp_processor_id() function and will print warnings
  84. if kernel code uses it in a preemption-unsafe way. Also, the kernel
  85. will detect preemption count underflows.
  86. config DEBUG_MUTEXES
  87. bool "Mutex debugging, deadlock detection"
  88. default y
  89. depends on DEBUG_KERNEL
  90. help
  91. This allows mutex semantics violations and mutex related deadlocks
  92. (lockups) to be detected and reported automatically.
  93. config DEBUG_SPINLOCK
  94. bool "Spinlock debugging"
  95. depends on DEBUG_KERNEL
  96. help
  97. Say Y here and build SMP to catch missing spinlock initialization
  98. and certain other kinds of spinlock errors commonly made. This is
  99. best used in conjunction with the NMI watchdog so that spinlock
  100. deadlocks are also debuggable.
  101. config DEBUG_SPINLOCK_SLEEP
  102. bool "Sleep-inside-spinlock checking"
  103. depends on DEBUG_KERNEL
  104. help
  105. If you say Y here, various routines which may sleep will become very
  106. noisy if they are called with a spinlock held.
  107. config DEBUG_KOBJECT
  108. bool "kobject debugging"
  109. depends on DEBUG_KERNEL
  110. help
  111. If you say Y here, some extra kobject debugging messages will be sent
  112. to the syslog.
  113. config DEBUG_HIGHMEM
  114. bool "Highmem debugging"
  115. depends on DEBUG_KERNEL && HIGHMEM
  116. help
  117. This options enables addition error checking for high memory systems.
  118. Disable for production systems.
  119. config DEBUG_BUGVERBOSE
  120. bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
  121. depends on BUG
  122. depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || X86_32 || FRV
  123. default !EMBEDDED
  124. help
  125. Say Y here to make BUG() panics output the file name and line number
  126. of the BUG call as well as the EIP and oops trace. This aids
  127. debugging but costs about 70-100K of memory.
  128. config DEBUG_INFO
  129. bool "Compile the kernel with debug info"
  130. depends on DEBUG_KERNEL
  131. help
  132. If you say Y here the resulting kernel image will include
  133. debugging info resulting in a larger kernel image.
  134. Say Y here only if you plan to debug the kernel.
  135. If unsure, say N.
  136. config DEBUG_IOREMAP
  137. bool "Enable ioremap() debugging"
  138. depends on DEBUG_KERNEL && PARISC
  139. help
  140. Enabling this option will cause the kernel to distinguish between
  141. ioremapped and physical addresses. It will print a backtrace (at
  142. most one every 10 seconds), hopefully allowing you to see which
  143. drivers need work. Fixing all these problems is a prerequisite
  144. for turning on USE_HPPA_IOREMAP. The warnings are harmless;
  145. the kernel has enough information to fix the broken drivers
  146. automatically, but we'd like to make it more efficient by not
  147. having to do that.
  148. config DEBUG_FS
  149. bool "Debug Filesystem"
  150. depends on DEBUG_KERNEL && SYSFS
  151. help
  152. debugfs is a virtual file system that kernel developers use to put
  153. debugging files into. Enable this option to be able to read and
  154. write to these files.
  155. If unsure, say N.
  156. config DEBUG_VM
  157. bool "Debug VM"
  158. depends on DEBUG_KERNEL
  159. help
  160. Enable this to turn on extended checks in the virtual-memory system
  161. that may impact performance.
  162. If unsure, say N.
  163. config FRAME_POINTER
  164. bool "Compile the kernel with frame pointers"
  165. depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML)
  166. default y if DEBUG_INFO && UML
  167. help
  168. If you say Y here the resulting kernel image will be slightly larger
  169. and slower, but it might give very useful debugging information on
  170. some architectures or if you use external debuggers.
  171. If you don't debug the kernel, you can say N.
  172. config FORCED_INLINING
  173. bool "Force gcc to inline functions marked 'inline'"
  174. depends on DEBUG_KERNEL
  175. default y
  176. help
  177. This option determines if the kernel forces gcc to inline the functions
  178. developers have marked 'inline'. Doing so takes away freedom from gcc to
  179. do what it thinks is best, which is desirable for the gcc 3.x series of
  180. compilers. The gcc 4.x series have a rewritten inlining algorithm and
  181. disabling this option will generate a smaller kernel there. Hopefully
  182. this algorithm is so good that allowing gcc4 to make the decision can
  183. become the default in the future, until then this option is there to
  184. test gcc for this.
  185. config RCU_TORTURE_TEST
  186. tristate "torture tests for RCU"
  187. depends on DEBUG_KERNEL
  188. default n
  189. help
  190. This option provides a kernel module that runs torture tests
  191. on the RCU infrastructure. The kernel module may be built
  192. after the fact on the running kernel to be tested, if desired.
  193. Say Y here if you want RCU torture tests to start automatically
  194. at boot time (you probably don't).
  195. Say M if you want the RCU torture tests to build as a module.
  196. Say N if you are unsure.