Kconfig 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. #
  2. # Architectures that offer an FTRACE implementation should select HAVE_FTRACE:
  3. #
  4. config HAVE_FTRACE
  5. bool
  6. config HAVE_DYNAMIC_FTRACE
  7. bool
  8. config HAVE_FTRACE_MCOUNT_RECORD
  9. bool
  10. config TRACER_MAX_TRACE
  11. bool
  12. config TRACING
  13. bool
  14. select DEBUG_FS
  15. select STACKTRACE
  16. select TRACEPOINTS
  17. config FTRACE
  18. bool "Kernel Function Tracer"
  19. depends on HAVE_FTRACE
  20. depends on DEBUG_KERNEL
  21. select FRAME_POINTER
  22. select TRACING
  23. select CONTEXT_SWITCH_TRACER
  24. help
  25. Enable the kernel to trace every kernel function. This is done
  26. by using a compiler feature to insert a small, 5-byte No-Operation
  27. instruction to the beginning of every kernel function, which NOP
  28. sequence is then dynamically patched into a tracer call when
  29. tracing is enabled by the administrator. If it's runtime disabled
  30. (the bootup default), then the overhead of the instructions is very
  31. small and not measurable even in micro-benchmarks.
  32. config IRQSOFF_TRACER
  33. bool "Interrupts-off Latency Tracer"
  34. default n
  35. depends on TRACE_IRQFLAGS_SUPPORT
  36. depends on GENERIC_TIME
  37. depends on HAVE_FTRACE
  38. depends on DEBUG_KERNEL
  39. select TRACE_IRQFLAGS
  40. select TRACING
  41. select TRACER_MAX_TRACE
  42. help
  43. This option measures the time spent in irqs-off critical
  44. sections, with microsecond accuracy.
  45. The default measurement method is a maximum search, which is
  46. disabled by default and can be runtime (re-)started
  47. via:
  48. echo 0 > /debugfs/tracing/tracing_max_latency
  49. (Note that kernel size and overhead increases with this option
  50. enabled. This option and the preempt-off timing option can be
  51. used together or separately.)
  52. config PREEMPT_TRACER
  53. bool "Preemption-off Latency Tracer"
  54. default n
  55. depends on GENERIC_TIME
  56. depends on PREEMPT
  57. depends on HAVE_FTRACE
  58. depends on DEBUG_KERNEL
  59. select TRACING
  60. select TRACER_MAX_TRACE
  61. help
  62. This option measures the time spent in preemption off critical
  63. sections, with microsecond accuracy.
  64. The default measurement method is a maximum search, which is
  65. disabled by default and can be runtime (re-)started
  66. via:
  67. echo 0 > /debugfs/tracing/tracing_max_latency
  68. (Note that kernel size and overhead increases with this option
  69. enabled. This option and the irqs-off timing option can be
  70. used together or separately.)
  71. config SYSPROF_TRACER
  72. bool "Sysprof Tracer"
  73. depends on X86
  74. select TRACING
  75. help
  76. This tracer provides the trace needed by the 'Sysprof' userspace
  77. tool.
  78. config SCHED_TRACER
  79. bool "Scheduling Latency Tracer"
  80. depends on HAVE_FTRACE
  81. depends on DEBUG_KERNEL
  82. select TRACING
  83. select CONTEXT_SWITCH_TRACER
  84. select TRACER_MAX_TRACE
  85. help
  86. This tracer tracks the latency of the highest priority task
  87. to be scheduled in, starting from the point it has woken up.
  88. config NOP_TRACER
  89. bool "NOP Tracer"
  90. depends on HAVE_FTRACE
  91. depends on DEBUG_KERNEL
  92. select TRACING
  93. help
  94. This tracer does nothing. The primary purpose for it is to
  95. politely print the output of ftrace_printk() calls without
  96. the overhead of an irrelevant trace taking place.
  97. config CONTEXT_SWITCH_TRACER
  98. bool "Trace process context switches"
  99. depends on HAVE_FTRACE
  100. depends on DEBUG_KERNEL
  101. select TRACING
  102. select MARKERS
  103. help
  104. This tracer gets called from the context switch and records
  105. all switching of tasks.
  106. config STACK_TRACER
  107. bool "Trace max stack"
  108. depends on HAVE_FTRACE
  109. depends on DEBUG_KERNEL
  110. select FTRACE
  111. select STACKTRACE
  112. help
  113. This tracer records the max stack of the kernel, and displays
  114. it in debugfs/tracing/stack_trace
  115. config DYNAMIC_FTRACE
  116. bool "enable/disable ftrace tracepoints dynamically"
  117. depends on FTRACE
  118. depends on HAVE_DYNAMIC_FTRACE
  119. depends on DEBUG_KERNEL
  120. default y
  121. help
  122. This option will modify all the calls to ftrace dynamically
  123. (will patch them out of the binary image and replaces them
  124. with a No-Op instruction) as they are called. A table is
  125. created to dynamically enable them again.
  126. This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
  127. has native performance as long as no tracing is active.
  128. The changes to the code are done by a kernel thread that
  129. wakes up once a second and checks to see if any ftrace calls
  130. were made. If so, it runs stop_machine (stops all CPUS)
  131. and modifies the code to jump over the call to ftrace.
  132. config FTRACE_MCOUNT_RECORD
  133. def_bool y
  134. depends on DYNAMIC_FTRACE
  135. depends on HAVE_FTRACE_MCOUNT_RECORD
  136. config FTRACE_SELFTEST
  137. bool
  138. config FTRACE_STARTUP_TEST
  139. bool "Perform a startup test on ftrace"
  140. depends on TRACING
  141. depends on DEBUG_KERNEL
  142. select FTRACE_SELFTEST
  143. help
  144. This option performs a series of startup tests on ftrace. On bootup
  145. a series of tests are made to verify that the tracer is
  146. functioning properly. It will do tests on all the configured
  147. tracers of ftrace.