Arnaldo Carvalho de Melo | 16444a8 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 1 | # |
| 2 | # Architectures that offer an FTRACE implementation should select HAVE_FTRACE: |
| 3 | # |
| 4 | config HAVE_FTRACE |
| 5 | bool |
Steven Rostedt | bc0c38d | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 6 | |
Steven Rostedt | 352ad25 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 7 | config TRACER_MAX_TRACE |
| 8 | bool |
| 9 | |
Steven Rostedt | bc0c38d | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 10 | config TRACING |
| 11 | bool |
| 12 | select DEBUG_FS |
Ingo Molnar | 86387f7 | 2008-05-12 21:20:51 +0200 | [diff] [blame] | 13 | select STACKTRACE |
Steven Rostedt | bc0c38d | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 14 | |
Steven Rostedt | 1b29b01 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 15 | config FTRACE |
| 16 | bool "Kernel Function Tracer" |
Ingo Molnar | 694379e | 2008-05-12 21:20:54 +0200 | [diff] [blame^] | 17 | depends on HAVE_FTRACE |
Steven Rostedt | 1b29b01 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 18 | select FRAME_POINTER |
| 19 | select TRACING |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 20 | select CONTEXT_SWITCH_TRACER |
Steven Rostedt | 1b29b01 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 21 | help |
| 22 | Enable the kernel to trace every kernel function. This is done |
| 23 | by using a compiler feature to insert a small, 5-byte No-Operation |
| 24 | instruction to the beginning of every kernel function, which NOP |
| 25 | sequence is then dynamically patched into a tracer call when |
| 26 | tracing is enabled by the administrator. If it's runtime disabled |
| 27 | (the bootup default), then the overhead of the instructions is very |
| 28 | small and not measurable even in micro-benchmarks. |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 29 | |
Steven Rostedt | 81d68a9 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 30 | config IRQSOFF_TRACER |
| 31 | bool "Interrupts-off Latency Tracer" |
| 32 | default n |
| 33 | depends on TRACE_IRQFLAGS_SUPPORT |
| 34 | depends on GENERIC_TIME |
| 35 | select TRACE_IRQFLAGS |
| 36 | select TRACING |
| 37 | select TRACER_MAX_TRACE |
| 38 | help |
| 39 | This option measures the time spent in irqs-off critical |
| 40 | sections, with microsecond accuracy. |
| 41 | |
| 42 | The default measurement method is a maximum search, which is |
| 43 | disabled by default and can be runtime (re-)started |
| 44 | via: |
| 45 | |
| 46 | echo 0 > /debugfs/tracing/tracing_max_latency |
| 47 | |
Steven Rostedt | 6cd8a4b | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 48 | (Note that kernel size and overhead increases with this option |
| 49 | enabled. This option and the preempt-off timing option can be |
| 50 | used together or separately.) |
| 51 | |
| 52 | config PREEMPT_TRACER |
| 53 | bool "Preemption-off Latency Tracer" |
| 54 | default n |
| 55 | depends on GENERIC_TIME |
| 56 | depends on PREEMPT |
| 57 | select TRACING |
| 58 | select TRACER_MAX_TRACE |
| 59 | help |
| 60 | This option measures the time spent in preemption off critical |
| 61 | sections, with microsecond accuracy. |
| 62 | |
| 63 | The default measurement method is a maximum search, which is |
| 64 | disabled by default and can be runtime (re-)started |
| 65 | via: |
| 66 | |
| 67 | echo 0 > /debugfs/tracing/tracing_max_latency |
| 68 | |
| 69 | (Note that kernel size and overhead increases with this option |
| 70 | enabled. This option and the irqs-off timing option can be |
| 71 | used together or separately.) |
| 72 | |
Steven Rostedt | 352ad25 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 73 | config SCHED_TRACER |
| 74 | bool "Scheduling Latency Tracer" |
Steven Rostedt | 352ad25 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 75 | select TRACING |
| 76 | select CONTEXT_SWITCH_TRACER |
| 77 | select TRACER_MAX_TRACE |
| 78 | help |
| 79 | This tracer tracks the latency of the highest priority task |
| 80 | to be scheduled in, starting from the point it has woken up. |
| 81 | |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 82 | config CONTEXT_SWITCH_TRACER |
| 83 | bool "Trace process context switches" |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 84 | select TRACING |
| 85 | select MARKERS |
| 86 | help |
| 87 | This tracer gets called from the context switch and records |
| 88 | all switching of tasks. |
| 89 | |
Steven Rostedt | 3d08339 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 90 | config DYNAMIC_FTRACE |
| 91 | bool "enable/disable ftrace tracepoints dynamically" |
| 92 | depends on FTRACE |
| 93 | default y |
| 94 | help |
| 95 | This option will modify all the calls to ftrace dynamically |
| 96 | (will patch them out of the binary image and replaces them |
| 97 | with a No-Op instruction) as they are called. A table is |
| 98 | created to dynamically enable them again. |
| 99 | |
| 100 | This way a CONFIG_FTRACE kernel is slightly larger, but otherwise |
| 101 | has native performance as long as no tracing is active. |
| 102 | |
| 103 | The changes to the code are done by a kernel thread that |
| 104 | wakes up once a second and checks to see if any ftrace calls |
| 105 | were made. If so, it runs stop_machine (stops all CPUS) |
| 106 | and modifies the code to jump over the call to ftrace. |
Steven Rostedt | 60a1177 | 2008-05-12 21:20:44 +0200 | [diff] [blame] | 107 | |
| 108 | config FTRACE_SELFTEST |
| 109 | bool |
| 110 | |
| 111 | config FTRACE_STARTUP_TEST |
| 112 | bool "Perform a startup test on ftrace" |
| 113 | depends on TRACING |
| 114 | select FTRACE_SELFTEST |
| 115 | help |
| 116 | This option performs a series of startup tests on ftrace. On bootup |
| 117 | a series of tests are made to verify that the tracer is |
| 118 | functioning properly. It will do tests on all the configured |
| 119 | tracers of ftrace. |