Kconfig 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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 CONTEXT_SWITCH_TRACER
  89. bool "Trace process context switches"
  90. depends on HAVE_FTRACE
  91. depends on DEBUG_KERNEL
  92. select TRACING
  93. select MARKERS
  94. help
  95. This tracer gets called from the context switch and records
  96. all switching of tasks.
  97. config STACK_TRACER
  98. bool "Trace max stack"
  99. depends on HAVE_FTRACE
  100. depends on DEBUG_KERNEL
  101. select FTRACE
  102. select STACKTRACE
  103. help
  104. This tracer records the max stack of the kernel, and displays
  105. it in debugfs/tracing/stack_trace
  106. config DYNAMIC_FTRACE
  107. bool "enable/disable ftrace tracepoints dynamically"
  108. depends on FTRACE
  109. depends on HAVE_DYNAMIC_FTRACE
  110. depends on DEBUG_KERNEL
  111. default y
  112. help
  113. This option will modify all the calls to ftrace dynamically
  114. (will patch them out of the binary image and replaces them
  115. with a No-Op instruction) as they are called. A table is
  116. created to dynamically enable them again.
  117. This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
  118. has native performance as long as no tracing is active.
  119. The changes to the code are done by a kernel thread that
  120. wakes up once a second and checks to see if any ftrace calls
  121. were made. If so, it runs stop_machine (stops all CPUS)
  122. and modifies the code to jump over the call to ftrace.
  123. config FTRACE_MCOUNT_RECORD
  124. def_bool y
  125. depends on DYNAMIC_FTRACE
  126. depends on HAVE_FTRACE_MCOUNT_RECORD
  127. config FTRACE_SELFTEST
  128. bool
  129. config FTRACE_STARTUP_TEST
  130. bool "Perform a startup test on ftrace"
  131. depends on TRACING
  132. depends on DEBUG_KERNEL
  133. select FTRACE_SELFTEST
  134. help
  135. This option performs a series of startup tests on ftrace. On bootup
  136. a series of tests are made to verify that the tracer is
  137. functioning properly. It will do tests on all the configured
  138. tracers of ftrace.