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