Kconfig 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. #
  2. # Architectures that offer an FUNCTION_TRACER implementation should
  3. # select HAVE_FUNCTION_TRACER:
  4. #
  5. config NOP_TRACER
  6. bool
  7. config HAVE_FUNCTION_TRACER
  8. bool
  9. config HAVE_DYNAMIC_FTRACE
  10. bool
  11. config HAVE_FTRACE_MCOUNT_RECORD
  12. bool
  13. config TRACER_MAX_TRACE
  14. bool
  15. config RING_BUFFER
  16. bool
  17. config TRACING
  18. bool
  19. select DEBUG_FS
  20. select RING_BUFFER
  21. select STACKTRACE if STACKTRACE_SUPPORT
  22. select TRACEPOINTS
  23. select NOP_TRACER
  24. menu "Tracers"
  25. config FUNCTION_TRACER
  26. bool "Kernel Function Tracer"
  27. depends on HAVE_FUNCTION_TRACER
  28. depends on DEBUG_KERNEL
  29. select FRAME_POINTER
  30. select TRACING
  31. select CONTEXT_SWITCH_TRACER
  32. help
  33. Enable the kernel to trace every kernel function. This is done
  34. by using a compiler feature to insert a small, 5-byte No-Operation
  35. instruction to the beginning of every kernel function, which NOP
  36. sequence is then dynamically patched into a tracer call when
  37. tracing is enabled by the administrator. If it's runtime disabled
  38. (the bootup default), then the overhead of the instructions is very
  39. small and not measurable even in micro-benchmarks.
  40. config IRQSOFF_TRACER
  41. bool "Interrupts-off Latency Tracer"
  42. default n
  43. depends on TRACE_IRQFLAGS_SUPPORT
  44. depends on GENERIC_TIME
  45. depends on DEBUG_KERNEL
  46. select TRACE_IRQFLAGS
  47. select TRACING
  48. select TRACER_MAX_TRACE
  49. help
  50. This option measures the time spent in irqs-off critical
  51. sections, with microsecond accuracy.
  52. The default measurement method is a maximum search, which is
  53. disabled by default and can be runtime (re-)started
  54. via:
  55. echo 0 > /debugfs/tracing/tracing_max_latency
  56. (Note that kernel size and overhead increases with this option
  57. enabled. This option and the preempt-off timing option can be
  58. used together or separately.)
  59. config PREEMPT_TRACER
  60. bool "Preemption-off Latency Tracer"
  61. default n
  62. depends on GENERIC_TIME
  63. depends on PREEMPT
  64. depends on DEBUG_KERNEL
  65. select TRACING
  66. select TRACER_MAX_TRACE
  67. help
  68. This option measures the time spent in preemption off critical
  69. sections, with microsecond accuracy.
  70. The default measurement method is a maximum search, which is
  71. disabled by default and can be runtime (re-)started
  72. via:
  73. echo 0 > /debugfs/tracing/tracing_max_latency
  74. (Note that kernel size and overhead increases with this option
  75. enabled. This option and the irqs-off timing option can be
  76. used together or separately.)
  77. config SYSPROF_TRACER
  78. bool "Sysprof Tracer"
  79. depends on X86
  80. select TRACING
  81. help
  82. This tracer provides the trace needed by the 'Sysprof' userspace
  83. tool.
  84. config SCHED_TRACER
  85. bool "Scheduling Latency Tracer"
  86. depends on DEBUG_KERNEL
  87. select TRACING
  88. select CONTEXT_SWITCH_TRACER
  89. select TRACER_MAX_TRACE
  90. help
  91. This tracer tracks the latency of the highest priority task
  92. to be scheduled in, starting from the point it has woken up.
  93. config CONTEXT_SWITCH_TRACER
  94. bool "Trace process context switches"
  95. depends on DEBUG_KERNEL
  96. select TRACING
  97. select MARKERS
  98. help
  99. This tracer gets called from the context switch and records
  100. all switching of tasks.
  101. config BOOT_TRACER
  102. bool "Trace boot initcalls"
  103. depends on DEBUG_KERNEL
  104. select TRACING
  105. select CONTEXT_SWITCH_TRACER
  106. help
  107. This tracer helps developers to optimize boot times: it records
  108. the timings of the initcalls and traces key events and the identity
  109. of tasks that can cause boot delays, such as context-switches.
  110. Its aim is to be parsed by the /scripts/bootgraph.pl tool to
  111. produce pretty graphics about boot inefficiencies, giving a visual
  112. representation of the delays during initcalls - but the raw
  113. /debug/tracing/trace text output is readable too.
  114. ( Note that tracing self tests can't be enabled if this tracer is
  115. selected, because the self-tests are an initcall as well and that
  116. would invalidate the boot trace. )
  117. config STACK_TRACER
  118. bool "Trace max stack"
  119. depends on HAVE_FUNCTION_TRACER
  120. depends on DEBUG_KERNEL
  121. select FUNCTION_TRACER
  122. select STACKTRACE
  123. help
  124. This special tracer records the maximum stack footprint of the
  125. kernel and displays it in debugfs/tracing/stack_trace.
  126. This tracer works by hooking into every function call that the
  127. kernel executes, and keeping a maximum stack depth value and
  128. stack-trace saved. Because this logic has to execute in every
  129. kernel function, all the time, this option can slow down the
  130. kernel measurably and is generally intended for kernel
  131. developers only.
  132. Say N if unsure.
  133. config DYNAMIC_FTRACE
  134. bool "enable/disable ftrace tracepoints dynamically"
  135. depends on FUNCTION_TRACER
  136. depends on HAVE_DYNAMIC_FTRACE
  137. depends on DEBUG_KERNEL
  138. default y
  139. help
  140. This option will modify all the calls to ftrace dynamically
  141. (will patch them out of the binary image and replaces them
  142. with a No-Op instruction) as they are called. A table is
  143. created to dynamically enable them again.
  144. This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise
  145. has native performance as long as no tracing is active.
  146. The changes to the code are done by a kernel thread that
  147. wakes up once a second and checks to see if any ftrace calls
  148. were made. If so, it runs stop_machine (stops all CPUS)
  149. and modifies the code to jump over the call to ftrace.
  150. config FTRACE_MCOUNT_RECORD
  151. def_bool y
  152. depends on DYNAMIC_FTRACE
  153. depends on HAVE_FTRACE_MCOUNT_RECORD
  154. config FTRACE_SELFTEST
  155. bool
  156. config FTRACE_STARTUP_TEST
  157. bool "Perform a startup test on ftrace"
  158. depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER
  159. select FTRACE_SELFTEST
  160. help
  161. This option performs a series of startup tests on ftrace. On bootup
  162. a series of tests are made to verify that the tracer is
  163. functioning properly. It will do tests on all the configured
  164. tracers of ftrace.
  165. endmenu