Kconfig 4.4 KB

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