Kconfig 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #
  2. # Architectures that offer an FTRACE implementation should select HAVE_FTRACE:
  3. #
  4. config HAVE_FTRACE
  5. bool
  6. config TRACER_MAX_TRACE
  7. bool
  8. config TRACING
  9. bool
  10. select DEBUG_FS
  11. config FTRACE
  12. bool "Kernel Function Tracer"
  13. depends on DEBUG_KERNEL && HAVE_FTRACE
  14. select FRAME_POINTER
  15. select TRACING
  16. select CONTEXT_SWITCH_TRACER
  17. help
  18. Enable the kernel to trace every kernel function. This is done
  19. by using a compiler feature to insert a small, 5-byte No-Operation
  20. instruction to the beginning of every kernel function, which NOP
  21. sequence is then dynamically patched into a tracer call when
  22. tracing is enabled by the administrator. If it's runtime disabled
  23. (the bootup default), then the overhead of the instructions is very
  24. small and not measurable even in micro-benchmarks.
  25. config IRQSOFF_TRACER
  26. bool "Interrupts-off Latency Tracer"
  27. default n
  28. depends on TRACE_IRQFLAGS_SUPPORT
  29. depends on GENERIC_TIME
  30. select TRACE_IRQFLAGS
  31. select TRACING
  32. select TRACER_MAX_TRACE
  33. help
  34. This option measures the time spent in irqs-off critical
  35. sections, with microsecond accuracy.
  36. The default measurement method is a maximum search, which is
  37. disabled by default and can be runtime (re-)started
  38. via:
  39. echo 0 > /debugfs/tracing/tracing_max_latency
  40. (Note that kernel size and overhead increases with this option
  41. enabled. This option and the preempt-off timing option can be
  42. used together or separately.)
  43. config PREEMPT_TRACER
  44. bool "Preemption-off Latency Tracer"
  45. default n
  46. depends on GENERIC_TIME
  47. depends on PREEMPT
  48. select TRACING
  49. select TRACER_MAX_TRACE
  50. help
  51. This option measures the time spent in preemption off critical
  52. sections, with microsecond accuracy.
  53. The default measurement method is a maximum search, which is
  54. disabled by default and can be runtime (re-)started
  55. via:
  56. echo 0 > /debugfs/tracing/tracing_max_latency
  57. (Note that kernel size and overhead increases with this option
  58. enabled. This option and the irqs-off timing option can be
  59. used together or separately.)
  60. config SCHED_TRACER
  61. bool "Scheduling Latency Tracer"
  62. depends on DEBUG_KERNEL
  63. select TRACING
  64. select CONTEXT_SWITCH_TRACER
  65. select TRACER_MAX_TRACE
  66. help
  67. This tracer tracks the latency of the highest priority task
  68. to be scheduled in, starting from the point it has woken up.
  69. config CONTEXT_SWITCH_TRACER
  70. bool "Trace process context switches"
  71. depends on DEBUG_KERNEL
  72. select TRACING
  73. select MARKERS
  74. help
  75. This tracer gets called from the context switch and records
  76. all switching of tasks.
  77. config DYNAMIC_FTRACE
  78. bool "enable/disable ftrace tracepoints dynamically"
  79. depends on FTRACE
  80. default y
  81. help
  82. This option will modify all the calls to ftrace dynamically
  83. (will patch them out of the binary image and replaces them
  84. with a No-Op instruction) as they are called. A table is
  85. created to dynamically enable them again.
  86. This way a CONFIG_FTRACE kernel is slightly larger, but otherwise
  87. has native performance as long as no tracing is active.
  88. The changes to the code are done by a kernel thread that
  89. wakes up once a second and checks to see if any ftrace calls
  90. were made. If so, it runs stop_machine (stops all CPUS)
  91. and modifies the code to jump over the call to ftrace.