Kconfig 5.6 KB

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