Kconfig 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. #
  2. # Architectures that offer an FUNCTION_TRACER implementation should
  3. # select HAVE_FUNCTION_TRACER:
  4. #
  5. config USER_STACKTRACE_SUPPORT
  6. bool
  7. config NOP_TRACER
  8. bool
  9. config HAVE_FTRACE_NMI_ENTER
  10. bool
  11. config HAVE_FUNCTION_TRACER
  12. bool
  13. config HAVE_FUNCTION_GRAPH_TRACER
  14. bool
  15. config HAVE_FUNCTION_TRACE_MCOUNT_TEST
  16. bool
  17. help
  18. This gets selected when the arch tests the function_trace_stop
  19. variable at the mcount call site. Otherwise, this variable
  20. is tested by the called function.
  21. config HAVE_DYNAMIC_FTRACE
  22. bool
  23. config HAVE_FTRACE_MCOUNT_RECORD
  24. bool
  25. config HAVE_HW_BRANCH_TRACER
  26. bool
  27. config TRACER_MAX_TRACE
  28. bool
  29. config RING_BUFFER
  30. bool
  31. config FTRACE_NMI_ENTER
  32. bool
  33. depends on HAVE_FTRACE_NMI_ENTER
  34. default y
  35. config TRACING
  36. bool
  37. select DEBUG_FS
  38. select RING_BUFFER
  39. select STACKTRACE if STACKTRACE_SUPPORT
  40. select TRACEPOINTS
  41. select NOP_TRACER
  42. menu "Tracers"
  43. config FUNCTION_TRACER
  44. bool "Kernel Function Tracer"
  45. depends on HAVE_FUNCTION_TRACER
  46. depends on DEBUG_KERNEL
  47. select FRAME_POINTER
  48. select TRACING
  49. select CONTEXT_SWITCH_TRACER
  50. help
  51. Enable the kernel to trace every kernel function. This is done
  52. by using a compiler feature to insert a small, 5-byte No-Operation
  53. instruction to the beginning of every kernel function, which NOP
  54. sequence is then dynamically patched into a tracer call when
  55. tracing is enabled by the administrator. If it's runtime disabled
  56. (the bootup default), then the overhead of the instructions is very
  57. small and not measurable even in micro-benchmarks.
  58. config FUNCTION_GRAPH_TRACER
  59. bool "Kernel Function Graph Tracer"
  60. depends on HAVE_FUNCTION_GRAPH_TRACER
  61. depends on FUNCTION_TRACER
  62. default y
  63. help
  64. Enable the kernel to trace a function at both its return
  65. and its entry.
  66. It's first purpose is to trace the duration of functions and
  67. draw a call graph for each thread with some informations like
  68. the return value.
  69. This is done by setting the current return address on the current
  70. task structure into a stack of calls.
  71. config IRQSOFF_TRACER
  72. bool "Interrupts-off Latency Tracer"
  73. default n
  74. depends on TRACE_IRQFLAGS_SUPPORT
  75. depends on GENERIC_TIME
  76. depends on DEBUG_KERNEL
  77. select TRACE_IRQFLAGS
  78. select TRACING
  79. select TRACER_MAX_TRACE
  80. help
  81. This option measures the time spent in irqs-off critical
  82. sections, with microsecond accuracy.
  83. The default measurement method is a maximum search, which is
  84. disabled by default and can be runtime (re-)started
  85. via:
  86. echo 0 > /debugfs/tracing/tracing_max_latency
  87. (Note that kernel size and overhead increases with this option
  88. enabled. This option and the preempt-off timing option can be
  89. used together or separately.)
  90. config PREEMPT_TRACER
  91. bool "Preemption-off Latency Tracer"
  92. default n
  93. depends on GENERIC_TIME
  94. depends on PREEMPT
  95. depends on DEBUG_KERNEL
  96. select TRACING
  97. select TRACER_MAX_TRACE
  98. help
  99. This option measures the time spent in preemption off critical
  100. sections, with microsecond accuracy.
  101. The default measurement method is a maximum search, which is
  102. disabled by default and can be runtime (re-)started
  103. via:
  104. echo 0 > /debugfs/tracing/tracing_max_latency
  105. (Note that kernel size and overhead increases with this option
  106. enabled. This option and the irqs-off timing option can be
  107. used together or separately.)
  108. config SYSPROF_TRACER
  109. bool "Sysprof Tracer"
  110. depends on X86
  111. select TRACING
  112. help
  113. This tracer provides the trace needed by the 'Sysprof' userspace
  114. tool.
  115. config SCHED_TRACER
  116. bool "Scheduling Latency Tracer"
  117. depends on DEBUG_KERNEL
  118. select TRACING
  119. select CONTEXT_SWITCH_TRACER
  120. select TRACER_MAX_TRACE
  121. help
  122. This tracer tracks the latency of the highest priority task
  123. to be scheduled in, starting from the point it has woken up.
  124. config CONTEXT_SWITCH_TRACER
  125. bool "Trace process context switches"
  126. depends on DEBUG_KERNEL
  127. select TRACING
  128. select MARKERS
  129. help
  130. This tracer gets called from the context switch and records
  131. all switching of tasks.
  132. config BOOT_TRACER
  133. bool "Trace boot initcalls"
  134. depends on DEBUG_KERNEL
  135. select TRACING
  136. select CONTEXT_SWITCH_TRACER
  137. help
  138. This tracer helps developers to optimize boot times: it records
  139. the timings of the initcalls and traces key events and the identity
  140. of tasks that can cause boot delays, such as context-switches.
  141. Its aim is to be parsed by the /scripts/bootgraph.pl tool to
  142. produce pretty graphics about boot inefficiencies, giving a visual
  143. representation of the delays during initcalls - but the raw
  144. /debug/tracing/trace text output is readable too.
  145. You must pass in ftrace=initcall to the kernel command line
  146. to enable this on bootup.
  147. config TRACE_BRANCH_PROFILING
  148. bool "Trace likely/unlikely profiler"
  149. depends on DEBUG_KERNEL
  150. select TRACING
  151. help
  152. This tracer profiles all the the likely and unlikely macros
  153. in the kernel. It will display the results in:
  154. /debugfs/tracing/profile_annotated_branch
  155. Note: this will add a significant overhead, only turn this
  156. on if you need to profile the system's use of these macros.
  157. Say N if unsure.
  158. config PROFILE_ALL_BRANCHES
  159. bool "Profile all if conditionals"
  160. depends on TRACE_BRANCH_PROFILING
  161. help
  162. This tracer profiles all branch conditions. Every if ()
  163. taken in the kernel is recorded whether it hit or miss.
  164. The results will be displayed in:
  165. /debugfs/tracing/profile_branch
  166. This configuration, when enabled, will impose a great overhead
  167. on the system. This should only be enabled when the system
  168. is to be analyzed
  169. Say N if unsure.
  170. config TRACING_BRANCHES
  171. bool
  172. help
  173. Selected by tracers that will trace the likely and unlikely
  174. conditions. This prevents the tracers themselves from being
  175. profiled. Profiling the tracing infrastructure can only happen
  176. when the likelys and unlikelys are not being traced.
  177. config BRANCH_TRACER
  178. bool "Trace likely/unlikely instances"
  179. depends on TRACE_BRANCH_PROFILING
  180. select TRACING_BRANCHES
  181. help
  182. This traces the events of likely and unlikely condition
  183. calls in the kernel. The difference between this and the
  184. "Trace likely/unlikely profiler" is that this is not a
  185. histogram of the callers, but actually places the calling
  186. events into a running trace buffer to see when and where the
  187. events happened, as well as their results.
  188. Say N if unsure.
  189. config POWER_TRACER
  190. bool "Trace power consumption behavior"
  191. depends on DEBUG_KERNEL
  192. depends on X86
  193. select TRACING
  194. help
  195. This tracer helps developers to analyze and optimize the kernels
  196. power management decisions, specifically the C-state and P-state
  197. behavior.
  198. config STACK_TRACER
  199. bool "Trace max stack"
  200. depends on HAVE_FUNCTION_TRACER
  201. depends on DEBUG_KERNEL
  202. select FUNCTION_TRACER
  203. select STACKTRACE
  204. help
  205. This special tracer records the maximum stack footprint of the
  206. kernel and displays it in debugfs/tracing/stack_trace.
  207. This tracer works by hooking into every function call that the
  208. kernel executes, and keeping a maximum stack depth value and
  209. stack-trace saved. If this is configured with DYNAMIC_FTRACE
  210. then it will not have any overhead while the stack tracer
  211. is disabled.
  212. To enable the stack tracer on bootup, pass in 'stacktrace'
  213. on the kernel command line.
  214. The stack tracer can also be enabled or disabled via the
  215. sysctl kernel.stack_tracer_enabled
  216. Say N if unsure.
  217. config HW_BRANCH_TRACER
  218. depends on HAVE_HW_BRANCH_TRACER
  219. bool "Trace hw branches"
  220. select TRACING
  221. help
  222. This tracer records all branches on the system in a circular
  223. buffer giving access to the last N branches for each cpu.
  224. config KMEMTRACE
  225. bool "Trace SLAB allocations"
  226. select TRACING
  227. help
  228. kmemtrace provides tracing for slab allocator functions, such as
  229. kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected
  230. data is then fed to the userspace application in order to analyse
  231. allocation hotspots, internal fragmentation and so on, making it
  232. possible to see how well an allocator performs, as well as debug
  233. and profile kernel code.
  234. This requires an userspace application to use. See
  235. Documentation/vm/kmemtrace.txt for more information.
  236. Saying Y will make the kernel somewhat larger and slower. However,
  237. if you disable kmemtrace at run-time or boot-time, the performance
  238. impact is minimal (depending on the arch the kernel is built for).
  239. If unsure, say N.
  240. config WORKQUEUE_TRACER
  241. bool "Trace workqueues"
  242. select TRACING
  243. help
  244. The workqueue tracer provides some statistical informations
  245. about each cpu workqueue thread such as the number of the
  246. works inserted and executed since their creation. It can help
  247. to evaluate the amount of work each of them have to perform.
  248. For example it can help a developer to decide whether he should
  249. choose a per cpu workqueue instead of a singlethreaded one.
  250. config DYNAMIC_FTRACE
  251. bool "enable/disable ftrace tracepoints dynamically"
  252. depends on FUNCTION_TRACER
  253. depends on HAVE_DYNAMIC_FTRACE
  254. depends on DEBUG_KERNEL
  255. default y
  256. help
  257. This option will modify all the calls to ftrace dynamically
  258. (will patch them out of the binary image and replaces them
  259. with a No-Op instruction) as they are called. A table is
  260. created to dynamically enable them again.
  261. This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise
  262. has native performance as long as no tracing is active.
  263. The changes to the code are done by a kernel thread that
  264. wakes up once a second and checks to see if any ftrace calls
  265. were made. If so, it runs stop_machine (stops all CPUS)
  266. and modifies the code to jump over the call to ftrace.
  267. config FTRACE_MCOUNT_RECORD
  268. def_bool y
  269. depends on DYNAMIC_FTRACE
  270. depends on HAVE_FTRACE_MCOUNT_RECORD
  271. config FTRACE_SELFTEST
  272. bool
  273. config FTRACE_STARTUP_TEST
  274. bool "Perform a startup test on ftrace"
  275. depends on TRACING && DEBUG_KERNEL
  276. select FTRACE_SELFTEST
  277. help
  278. This option performs a series of startup tests on ftrace. On bootup
  279. a series of tests are made to verify that the tracer is
  280. functioning properly. It will do tests on all the configured
  281. tracers of ftrace.
  282. config MMIOTRACE
  283. bool "Memory mapped IO tracing"
  284. depends on HAVE_MMIOTRACE_SUPPORT && DEBUG_KERNEL && PCI
  285. select TRACING
  286. help
  287. Mmiotrace traces Memory Mapped I/O access and is meant for
  288. debugging and reverse engineering. It is called from the ioremap
  289. implementation and works via page faults. Tracing is disabled by
  290. default and can be enabled at run-time.
  291. See Documentation/tracers/mmiotrace.txt.
  292. If you are not helping to develop drivers, say N.
  293. config MMIOTRACE_TEST
  294. tristate "Test module for mmiotrace"
  295. depends on MMIOTRACE && m
  296. help
  297. This is a dumb module for testing mmiotrace. It is very dangerous
  298. as it will write garbage to IO memory starting at a given address.
  299. However, it should be safe to use on e.g. unused portion of VRAM.
  300. Say N, unless you absolutely know what you are doing.
  301. endmenu