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