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 | 677aa9f | 2008-05-17 00:01:36 -0400 | [diff] [blame] | 7 | config HAVE_DYNAMIC_FTRACE |
| 8 | bool |
| 9 | |
Steven Rostedt | 352ad25 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 10 | config TRACER_MAX_TRACE |
| 11 | bool |
| 12 | |
Steven Rostedt | bc0c38d | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 13 | config TRACING |
| 14 | bool |
| 15 | select DEBUG_FS |
Ingo Molnar | 86387f7 | 2008-05-12 21:20:51 +0200 | [diff] [blame] | 16 | select STACKTRACE |
Steven Rostedt | bc0c38d | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 17 | |
Steven Rostedt | 1b29b01 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 18 | config FTRACE |
| 19 | bool "Kernel Function Tracer" |
Ingo Molnar | 694379e | 2008-05-12 21:20:54 +0200 | [diff] [blame] | 20 | depends on HAVE_FTRACE |
Steven Rostedt | 1b29b01 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 21 | select FRAME_POINTER |
| 22 | select TRACING |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 23 | select CONTEXT_SWITCH_TRACER |
Steven Rostedt | 1b29b01 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 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. |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 32 | |
Steven Rostedt | 81d68a9 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 33 | config IRQSOFF_TRACER |
| 34 | bool "Interrupts-off Latency Tracer" |
| 35 | default n |
| 36 | depends on TRACE_IRQFLAGS_SUPPORT |
| 37 | depends on GENERIC_TIME |
Ingo Molnar | c1d2327 | 2008-05-12 21:20:55 +0200 | [diff] [blame] | 38 | depends on HAVE_FTRACE |
Steven Rostedt | 81d68a9 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 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 | |
| 46 | The default measurement method is a maximum search, which is |
| 47 | disabled by default and can be runtime (re-)started |
| 48 | via: |
| 49 | |
| 50 | echo 0 > /debugfs/tracing/tracing_max_latency |
| 51 | |
Steven Rostedt | 6cd8a4b | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 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 | |
| 56 | config PREEMPT_TRACER |
| 57 | bool "Preemption-off Latency Tracer" |
| 58 | default n |
| 59 | depends on GENERIC_TIME |
| 60 | depends on PREEMPT |
Ingo Molnar | c1d2327 | 2008-05-12 21:20:55 +0200 | [diff] [blame] | 61 | depends on HAVE_FTRACE |
Steven Rostedt | 6cd8a4b | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 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 | |
| 68 | The default measurement method is a maximum search, which is |
| 69 | disabled by default and can be runtime (re-)started |
| 70 | via: |
| 71 | |
| 72 | echo 0 > /debugfs/tracing/tracing_max_latency |
| 73 | |
| 74 | (Note that kernel size and overhead increases with this option |
| 75 | enabled. This option and the irqs-off timing option can be |
| 76 | used together or separately.) |
| 77 | |
Ingo Molnar | f06c381 | 2008-05-12 21:20:47 +0200 | [diff] [blame] | 78 | config SYSPROF_TRACER |
| 79 | bool "Sysprof Tracer" |
Thomas Gleixner | 4d2df79 | 2008-05-24 15:00:46 +0200 | [diff] [blame] | 80 | depends on X86 |
Ingo Molnar | f06c381 | 2008-05-12 21:20:47 +0200 | [diff] [blame] | 81 | select TRACING |
| 82 | help |
| 83 | This tracer provides the trace needed by the 'Sysprof' userspace |
| 84 | tool. |
| 85 | |
Steven Rostedt | 352ad25 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 86 | config SCHED_TRACER |
| 87 | bool "Scheduling Latency Tracer" |
Ingo Molnar | c1d2327 | 2008-05-12 21:20:55 +0200 | [diff] [blame] | 88 | depends on HAVE_FTRACE |
Steven Rostedt | 352ad25 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 89 | select TRACING |
| 90 | select CONTEXT_SWITCH_TRACER |
| 91 | select TRACER_MAX_TRACE |
| 92 | help |
| 93 | This tracer tracks the latency of the highest priority task |
| 94 | to be scheduled in, starting from the point it has woken up. |
| 95 | |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 96 | config CONTEXT_SWITCH_TRACER |
| 97 | bool "Trace process context switches" |
Ingo Molnar | c1d2327 | 2008-05-12 21:20:55 +0200 | [diff] [blame] | 98 | depends on HAVE_FTRACE |
Steven Rostedt | 35e8e30 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 99 | select TRACING |
| 100 | select MARKERS |
| 101 | help |
| 102 | This tracer gets called from the context switch and records |
| 103 | all switching of tasks. |
| 104 | |
Steven Rostedt | 3d08339 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 105 | config DYNAMIC_FTRACE |
| 106 | bool "enable/disable ftrace tracepoints dynamically" |
| 107 | depends on FTRACE |
Steven Rostedt | 677aa9f | 2008-05-17 00:01:36 -0400 | [diff] [blame] | 108 | depends on HAVE_DYNAMIC_FTRACE |
Steven Rostedt | 3d08339 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 109 | default y |
| 110 | help |
| 111 | This option will modify all the calls to ftrace dynamically |
| 112 | (will patch them out of the binary image and replaces them |
| 113 | with a No-Op instruction) as they are called. A table is |
| 114 | created to dynamically enable them again. |
| 115 | |
| 116 | This way a CONFIG_FTRACE kernel is slightly larger, but otherwise |
| 117 | has native performance as long as no tracing is active. |
| 118 | |
| 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. |
Steven Rostedt | 60a1177 | 2008-05-12 21:20:44 +0200 | [diff] [blame] | 123 | |
| 124 | config FTRACE_SELFTEST |
| 125 | bool |
| 126 | |
| 127 | config FTRACE_STARTUP_TEST |
| 128 | bool "Perform a startup test on ftrace" |
| 129 | depends on TRACING |
| 130 | select FTRACE_SELFTEST |
| 131 | help |
| 132 | This option performs a series of startup tests on ftrace. On bootup |
| 133 | a series of tests are made to verify that the tracer is |
| 134 | functioning properly. It will do tests on all the configured |
| 135 | tracers of ftrace. |