Kconfig 5.6 KB

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