diff options
Diffstat (limited to 'kernel/trace/Kconfig')
-rw-r--r-- | kernel/trace/Kconfig | 87 |
1 files changed, 75 insertions, 12 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 263e9e6bbd60..33dbefd471e8 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
@@ -1,23 +1,40 @@ | |||
1 | # | 1 | # |
2 | # Architectures that offer an FTRACE implementation should select HAVE_FTRACE: | 2 | # Architectures that offer an FUNCTION_TRACER implementation should |
3 | # select HAVE_FUNCTION_TRACER: | ||
3 | # | 4 | # |
4 | config HAVE_FTRACE | 5 | |
6 | config NOP_TRACER | ||
7 | bool | ||
8 | |||
9 | config HAVE_FUNCTION_TRACER | ||
5 | bool | 10 | bool |
6 | 11 | ||
7 | config HAVE_DYNAMIC_FTRACE | 12 | config HAVE_DYNAMIC_FTRACE |
8 | bool | 13 | bool |
9 | 14 | ||
15 | config HAVE_FTRACE_MCOUNT_RECORD | ||
16 | bool | ||
17 | |||
10 | config TRACER_MAX_TRACE | 18 | config TRACER_MAX_TRACE |
11 | bool | 19 | bool |
12 | 20 | ||
21 | config RING_BUFFER | ||
22 | bool | ||
23 | |||
13 | config TRACING | 24 | config TRACING |
14 | bool | 25 | bool |
15 | select DEBUG_FS | 26 | select DEBUG_FS |
16 | select STACKTRACE | 27 | select RING_BUFFER |
28 | select STACKTRACE if STACKTRACE_SUPPORT | ||
29 | select TRACEPOINTS | ||
30 | select NOP_TRACER | ||
17 | 31 | ||
18 | config FTRACE | 32 | menu "Tracers" |
33 | |||
34 | config FUNCTION_TRACER | ||
19 | bool "Kernel Function Tracer" | 35 | bool "Kernel Function Tracer" |
20 | depends on HAVE_FTRACE | 36 | depends on HAVE_FUNCTION_TRACER |
37 | depends on DEBUG_KERNEL | ||
21 | select FRAME_POINTER | 38 | select FRAME_POINTER |
22 | select TRACING | 39 | select TRACING |
23 | select CONTEXT_SWITCH_TRACER | 40 | select CONTEXT_SWITCH_TRACER |
@@ -35,7 +52,7 @@ config IRQSOFF_TRACER | |||
35 | default n | 52 | default n |
36 | depends on TRACE_IRQFLAGS_SUPPORT | 53 | depends on TRACE_IRQFLAGS_SUPPORT |
37 | depends on GENERIC_TIME | 54 | depends on GENERIC_TIME |
38 | depends on HAVE_FTRACE | 55 | depends on DEBUG_KERNEL |
39 | select TRACE_IRQFLAGS | 56 | select TRACE_IRQFLAGS |
40 | select TRACING | 57 | select TRACING |
41 | select TRACER_MAX_TRACE | 58 | select TRACER_MAX_TRACE |
@@ -58,7 +75,7 @@ config PREEMPT_TRACER | |||
58 | default n | 75 | default n |
59 | depends on GENERIC_TIME | 76 | depends on GENERIC_TIME |
60 | depends on PREEMPT | 77 | depends on PREEMPT |
61 | depends on HAVE_FTRACE | 78 | depends on DEBUG_KERNEL |
62 | select TRACING | 79 | select TRACING |
63 | select TRACER_MAX_TRACE | 80 | select TRACER_MAX_TRACE |
64 | help | 81 | help |
@@ -85,7 +102,7 @@ config SYSPROF_TRACER | |||
85 | 102 | ||
86 | config SCHED_TRACER | 103 | config SCHED_TRACER |
87 | bool "Scheduling Latency Tracer" | 104 | bool "Scheduling Latency Tracer" |
88 | depends on HAVE_FTRACE | 105 | depends on DEBUG_KERNEL |
89 | select TRACING | 106 | select TRACING |
90 | select CONTEXT_SWITCH_TRACER | 107 | select CONTEXT_SWITCH_TRACER |
91 | select TRACER_MAX_TRACE | 108 | select TRACER_MAX_TRACE |
@@ -95,17 +112,56 @@ config SCHED_TRACER | |||
95 | 112 | ||
96 | config CONTEXT_SWITCH_TRACER | 113 | config CONTEXT_SWITCH_TRACER |
97 | bool "Trace process context switches" | 114 | bool "Trace process context switches" |
98 | depends on HAVE_FTRACE | 115 | depends on DEBUG_KERNEL |
99 | select TRACING | 116 | select TRACING |
100 | select MARKERS | 117 | select MARKERS |
101 | help | 118 | help |
102 | This tracer gets called from the context switch and records | 119 | This tracer gets called from the context switch and records |
103 | all switching of tasks. | 120 | all switching of tasks. |
104 | 121 | ||
122 | config BOOT_TRACER | ||
123 | bool "Trace boot initcalls" | ||
124 | depends on DEBUG_KERNEL | ||
125 | select TRACING | ||
126 | select CONTEXT_SWITCH_TRACER | ||
127 | help | ||
128 | This tracer helps developers to optimize boot times: it records | ||
129 | the timings of the initcalls and traces key events and the identity | ||
130 | of tasks that can cause boot delays, such as context-switches. | ||
131 | |||
132 | Its aim is to be parsed by the /scripts/bootgraph.pl tool to | ||
133 | produce pretty graphics about boot inefficiencies, giving a visual | ||
134 | representation of the delays during initcalls - but the raw | ||
135 | /debug/tracing/trace text output is readable too. | ||
136 | |||
137 | ( Note that tracing self tests can't be enabled if this tracer is | ||
138 | selected, because the self-tests are an initcall as well and that | ||
139 | would invalidate the boot trace. ) | ||
140 | |||
141 | config STACK_TRACER | ||
142 | bool "Trace max stack" | ||
143 | depends on HAVE_FUNCTION_TRACER | ||
144 | depends on DEBUG_KERNEL | ||
145 | select FUNCTION_TRACER | ||
146 | select STACKTRACE | ||
147 | help | ||
148 | This special tracer records the maximum stack footprint of the | ||
149 | kernel and displays it in debugfs/tracing/stack_trace. | ||
150 | |||
151 | This tracer works by hooking into every function call that the | ||
152 | kernel executes, and keeping a maximum stack depth value and | ||
153 | stack-trace saved. Because this logic has to execute in every | ||
154 | kernel function, all the time, this option can slow down the | ||
155 | kernel measurably and is generally intended for kernel | ||
156 | developers only. | ||
157 | |||
158 | Say N if unsure. | ||
159 | |||
105 | config DYNAMIC_FTRACE | 160 | config DYNAMIC_FTRACE |
106 | bool "enable/disable ftrace tracepoints dynamically" | 161 | bool "enable/disable ftrace tracepoints dynamically" |
107 | depends on FTRACE | 162 | depends on FUNCTION_TRACER |
108 | depends on HAVE_DYNAMIC_FTRACE | 163 | depends on HAVE_DYNAMIC_FTRACE |
164 | depends on DEBUG_KERNEL | ||
109 | default y | 165 | default y |
110 | help | 166 | help |
111 | This option will modify all the calls to ftrace dynamically | 167 | This option will modify all the calls to ftrace dynamically |
@@ -113,7 +169,7 @@ config DYNAMIC_FTRACE | |||
113 | with a No-Op instruction) as they are called. A table is | 169 | with a No-Op instruction) as they are called. A table is |
114 | created to dynamically enable them again. | 170 | created to dynamically enable them again. |
115 | 171 | ||
116 | This way a CONFIG_FTRACE kernel is slightly larger, but otherwise | 172 | This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise |
117 | has native performance as long as no tracing is active. | 173 | has native performance as long as no tracing is active. |
118 | 174 | ||
119 | The changes to the code are done by a kernel thread that | 175 | The changes to the code are done by a kernel thread that |
@@ -121,15 +177,22 @@ config DYNAMIC_FTRACE | |||
121 | were made. If so, it runs stop_machine (stops all CPUS) | 177 | were made. If so, it runs stop_machine (stops all CPUS) |
122 | and modifies the code to jump over the call to ftrace. | 178 | and modifies the code to jump over the call to ftrace. |
123 | 179 | ||
180 | config FTRACE_MCOUNT_RECORD | ||
181 | def_bool y | ||
182 | depends on DYNAMIC_FTRACE | ||
183 | depends on HAVE_FTRACE_MCOUNT_RECORD | ||
184 | |||
124 | config FTRACE_SELFTEST | 185 | config FTRACE_SELFTEST |
125 | bool | 186 | bool |
126 | 187 | ||
127 | config FTRACE_STARTUP_TEST | 188 | config FTRACE_STARTUP_TEST |
128 | bool "Perform a startup test on ftrace" | 189 | bool "Perform a startup test on ftrace" |
129 | depends on TRACING | 190 | depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER |
130 | select FTRACE_SELFTEST | 191 | select FTRACE_SELFTEST |
131 | help | 192 | help |
132 | This option performs a series of startup tests on ftrace. On bootup | 193 | 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 | 194 | a series of tests are made to verify that the tracer is |
134 | functioning properly. It will do tests on all the configured | 195 | functioning properly. It will do tests on all the configured |
135 | tracers of ftrace. | 196 | tracers of ftrace. |
197 | |||
198 | endmenu | ||