diff options
Diffstat (limited to 'kernel/trace/Kconfig')
| -rw-r--r-- | kernel/trace/Kconfig | 134 |
1 files changed, 113 insertions, 21 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 34e707e5ab87..417d1985e299 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
| @@ -9,6 +9,9 @@ config USER_STACKTRACE_SUPPORT | |||
| 9 | config NOP_TRACER | 9 | config NOP_TRACER |
| 10 | bool | 10 | bool |
| 11 | 11 | ||
| 12 | config HAVE_FTRACE_NMI_ENTER | ||
| 13 | bool | ||
| 14 | |||
| 12 | config HAVE_FUNCTION_TRACER | 15 | config HAVE_FUNCTION_TRACER |
| 13 | bool | 16 | bool |
| 14 | 17 | ||
| @@ -31,12 +34,20 @@ config HAVE_FTRACE_MCOUNT_RECORD | |||
| 31 | config HAVE_HW_BRANCH_TRACER | 34 | config HAVE_HW_BRANCH_TRACER |
| 32 | bool | 35 | bool |
| 33 | 36 | ||
| 37 | config HAVE_FTRACE_SYSCALLS | ||
| 38 | bool | ||
| 39 | |||
| 34 | config TRACER_MAX_TRACE | 40 | config TRACER_MAX_TRACE |
| 35 | bool | 41 | bool |
| 36 | 42 | ||
| 37 | config RING_BUFFER | 43 | config RING_BUFFER |
| 38 | bool | 44 | bool |
| 39 | 45 | ||
| 46 | config FTRACE_NMI_ENTER | ||
| 47 | bool | ||
| 48 | depends on HAVE_FTRACE_NMI_ENTER | ||
| 49 | default y | ||
| 50 | |||
| 40 | config TRACING | 51 | config TRACING |
| 41 | bool | 52 | bool |
| 42 | select DEBUG_FS | 53 | select DEBUG_FS |
| @@ -44,13 +55,29 @@ config TRACING | |||
| 44 | select STACKTRACE if STACKTRACE_SUPPORT | 55 | select STACKTRACE if STACKTRACE_SUPPORT |
| 45 | select TRACEPOINTS | 56 | select TRACEPOINTS |
| 46 | select NOP_TRACER | 57 | select NOP_TRACER |
| 58 | select BINARY_PRINTF | ||
| 59 | |||
| 60 | # | ||
| 61 | # Minimum requirements an architecture has to meet for us to | ||
| 62 | # be able to offer generic tracing facilities: | ||
| 63 | # | ||
| 64 | config TRACING_SUPPORT | ||
| 65 | bool | ||
| 66 | # PPC32 has no irqflags tracing support, but it can use most of the | ||
| 67 | # tracers anyway, they were tested to build and work. Note that new | ||
| 68 | # exceptions to this list aren't welcomed, better implement the | ||
| 69 | # irqflags tracing for your architecture. | ||
| 70 | depends on TRACE_IRQFLAGS_SUPPORT || PPC32 | ||
| 71 | depends on STACKTRACE_SUPPORT | ||
| 72 | default y | ||
| 73 | |||
| 74 | if TRACING_SUPPORT | ||
| 47 | 75 | ||
| 48 | menu "Tracers" | 76 | menu "Tracers" |
| 49 | 77 | ||
| 50 | config FUNCTION_TRACER | 78 | config FUNCTION_TRACER |
| 51 | bool "Kernel Function Tracer" | 79 | bool "Kernel Function Tracer" |
| 52 | depends on HAVE_FUNCTION_TRACER | 80 | depends on HAVE_FUNCTION_TRACER |
| 53 | depends on DEBUG_KERNEL | ||
| 54 | select FRAME_POINTER | 81 | select FRAME_POINTER |
| 55 | select KALLSYMS | 82 | select KALLSYMS |
| 56 | select TRACING | 83 | select TRACING |
| @@ -72,18 +99,16 @@ config FUNCTION_GRAPH_TRACER | |||
| 72 | help | 99 | help |
| 73 | Enable the kernel to trace a function at both its return | 100 | Enable the kernel to trace a function at both its return |
| 74 | and its entry. | 101 | and its entry. |
| 75 | It's first purpose is to trace the duration of functions and | 102 | Its first purpose is to trace the duration of functions and |
| 76 | draw a call graph for each thread with some informations like | 103 | draw a call graph for each thread with some information like |
| 77 | the return value. | 104 | the return value. This is done by setting the current return |
| 78 | This is done by setting the current return address on the current | 105 | address on the current task structure into a stack of calls. |
| 79 | task structure into a stack of calls. | ||
| 80 | 106 | ||
| 81 | config IRQSOFF_TRACER | 107 | config IRQSOFF_TRACER |
| 82 | bool "Interrupts-off Latency Tracer" | 108 | bool "Interrupts-off Latency Tracer" |
| 83 | default n | 109 | default n |
| 84 | depends on TRACE_IRQFLAGS_SUPPORT | 110 | depends on TRACE_IRQFLAGS_SUPPORT |
| 85 | depends on GENERIC_TIME | 111 | depends on GENERIC_TIME |
| 86 | depends on DEBUG_KERNEL | ||
| 87 | select TRACE_IRQFLAGS | 112 | select TRACE_IRQFLAGS |
| 88 | select TRACING | 113 | select TRACING |
| 89 | select TRACER_MAX_TRACE | 114 | select TRACER_MAX_TRACE |
| @@ -106,7 +131,6 @@ config PREEMPT_TRACER | |||
| 106 | default n | 131 | default n |
| 107 | depends on GENERIC_TIME | 132 | depends on GENERIC_TIME |
| 108 | depends on PREEMPT | 133 | depends on PREEMPT |
| 109 | depends on DEBUG_KERNEL | ||
| 110 | select TRACING | 134 | select TRACING |
| 111 | select TRACER_MAX_TRACE | 135 | select TRACER_MAX_TRACE |
| 112 | help | 136 | help |
| @@ -127,13 +151,13 @@ config SYSPROF_TRACER | |||
| 127 | bool "Sysprof Tracer" | 151 | bool "Sysprof Tracer" |
| 128 | depends on X86 | 152 | depends on X86 |
| 129 | select TRACING | 153 | select TRACING |
| 154 | select CONTEXT_SWITCH_TRACER | ||
| 130 | help | 155 | help |
| 131 | This tracer provides the trace needed by the 'Sysprof' userspace | 156 | This tracer provides the trace needed by the 'Sysprof' userspace |
| 132 | tool. | 157 | tool. |
| 133 | 158 | ||
| 134 | config SCHED_TRACER | 159 | config SCHED_TRACER |
| 135 | bool "Scheduling Latency Tracer" | 160 | bool "Scheduling Latency Tracer" |
| 136 | depends on DEBUG_KERNEL | ||
| 137 | select TRACING | 161 | select TRACING |
| 138 | select CONTEXT_SWITCH_TRACER | 162 | select CONTEXT_SWITCH_TRACER |
| 139 | select TRACER_MAX_TRACE | 163 | select TRACER_MAX_TRACE |
| @@ -143,16 +167,30 @@ config SCHED_TRACER | |||
| 143 | 167 | ||
| 144 | config CONTEXT_SWITCH_TRACER | 168 | config CONTEXT_SWITCH_TRACER |
| 145 | bool "Trace process context switches" | 169 | bool "Trace process context switches" |
| 146 | depends on DEBUG_KERNEL | ||
| 147 | select TRACING | 170 | select TRACING |
| 148 | select MARKERS | 171 | select MARKERS |
| 149 | help | 172 | help |
| 150 | This tracer gets called from the context switch and records | 173 | This tracer gets called from the context switch and records |
| 151 | all switching of tasks. | 174 | all switching of tasks. |
| 152 | 175 | ||
| 176 | config EVENT_TRACER | ||
| 177 | bool "Trace various events in the kernel" | ||
| 178 | select TRACING | ||
| 179 | help | ||
| 180 | This tracer hooks to various trace points in the kernel | ||
| 181 | allowing the user to pick and choose which trace point they | ||
| 182 | want to trace. | ||
| 183 | |||
| 184 | config FTRACE_SYSCALLS | ||
| 185 | bool "Trace syscalls" | ||
| 186 | depends on HAVE_FTRACE_SYSCALLS | ||
| 187 | select TRACING | ||
| 188 | select KALLSYMS | ||
| 189 | help | ||
| 190 | Basic tracer to catch the syscall entry and exit events. | ||
| 191 | |||
| 153 | config BOOT_TRACER | 192 | config BOOT_TRACER |
| 154 | bool "Trace boot initcalls" | 193 | bool "Trace boot initcalls" |
| 155 | depends on DEBUG_KERNEL | ||
| 156 | select TRACING | 194 | select TRACING |
| 157 | select CONTEXT_SWITCH_TRACER | 195 | select CONTEXT_SWITCH_TRACER |
| 158 | help | 196 | help |
| @@ -165,13 +203,11 @@ config BOOT_TRACER | |||
| 165 | representation of the delays during initcalls - but the raw | 203 | representation of the delays during initcalls - but the raw |
| 166 | /debug/tracing/trace text output is readable too. | 204 | /debug/tracing/trace text output is readable too. |
| 167 | 205 | ||
| 168 | ( Note that tracing self tests can't be enabled if this tracer is | 206 | You must pass in ftrace=initcall to the kernel command line |
| 169 | selected, because the self-tests are an initcall as well and that | 207 | to enable this on bootup. |
| 170 | would invalidate the boot trace. ) | ||
| 171 | 208 | ||
| 172 | config TRACE_BRANCH_PROFILING | 209 | config TRACE_BRANCH_PROFILING |
| 173 | bool "Trace likely/unlikely profiler" | 210 | bool "Trace likely/unlikely profiler" |
| 174 | depends on DEBUG_KERNEL | ||
| 175 | select TRACING | 211 | select TRACING |
| 176 | help | 212 | help |
| 177 | This tracer profiles all the the likely and unlikely macros | 213 | This tracer profiles all the the likely and unlikely macros |
| @@ -224,7 +260,6 @@ config BRANCH_TRACER | |||
| 224 | 260 | ||
| 225 | config POWER_TRACER | 261 | config POWER_TRACER |
| 226 | bool "Trace power consumption behavior" | 262 | bool "Trace power consumption behavior" |
| 227 | depends on DEBUG_KERNEL | ||
| 228 | depends on X86 | 263 | depends on X86 |
| 229 | select TRACING | 264 | select TRACING |
| 230 | help | 265 | help |
| @@ -236,7 +271,6 @@ config POWER_TRACER | |||
| 236 | config STACK_TRACER | 271 | config STACK_TRACER |
| 237 | bool "Trace max stack" | 272 | bool "Trace max stack" |
| 238 | depends on HAVE_FUNCTION_TRACER | 273 | depends on HAVE_FUNCTION_TRACER |
| 239 | depends on DEBUG_KERNEL | ||
| 240 | select FUNCTION_TRACER | 274 | select FUNCTION_TRACER |
| 241 | select STACKTRACE | 275 | select STACKTRACE |
| 242 | select KALLSYMS | 276 | select KALLSYMS |
| @@ -266,11 +300,66 @@ config HW_BRANCH_TRACER | |||
| 266 | This tracer records all branches on the system in a circular | 300 | This tracer records all branches on the system in a circular |
| 267 | buffer giving access to the last N branches for each cpu. | 301 | buffer giving access to the last N branches for each cpu. |
| 268 | 302 | ||
| 303 | config KMEMTRACE | ||
| 304 | bool "Trace SLAB allocations" | ||
| 305 | select TRACING | ||
| 306 | help | ||
| 307 | kmemtrace provides tracing for slab allocator functions, such as | ||
| 308 | kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected | ||
| 309 | data is then fed to the userspace application in order to analyse | ||
| 310 | allocation hotspots, internal fragmentation and so on, making it | ||
| 311 | possible to see how well an allocator performs, as well as debug | ||
| 312 | and profile kernel code. | ||
| 313 | |||
| 314 | This requires an userspace application to use. See | ||
| 315 | Documentation/trace/kmemtrace.txt for more information. | ||
| 316 | |||
| 317 | Saying Y will make the kernel somewhat larger and slower. However, | ||
| 318 | if you disable kmemtrace at run-time or boot-time, the performance | ||
| 319 | impact is minimal (depending on the arch the kernel is built for). | ||
| 320 | |||
| 321 | If unsure, say N. | ||
| 322 | |||
| 323 | config WORKQUEUE_TRACER | ||
| 324 | bool "Trace workqueues" | ||
| 325 | select TRACING | ||
| 326 | help | ||
| 327 | The workqueue tracer provides some statistical informations | ||
| 328 | about each cpu workqueue thread such as the number of the | ||
| 329 | works inserted and executed since their creation. It can help | ||
| 330 | to evaluate the amount of work each of them have to perform. | ||
| 331 | For example it can help a developer to decide whether he should | ||
| 332 | choose a per cpu workqueue instead of a singlethreaded one. | ||
| 333 | |||
| 334 | config BLK_DEV_IO_TRACE | ||
| 335 | bool "Support for tracing block io actions" | ||
| 336 | depends on SYSFS | ||
| 337 | depends on BLOCK | ||
| 338 | select RELAY | ||
| 339 | select DEBUG_FS | ||
| 340 | select TRACEPOINTS | ||
| 341 | select TRACING | ||
| 342 | select STACKTRACE | ||
| 343 | help | ||
| 344 | Say Y here if you want to be able to trace the block layer actions | ||
| 345 | on a given queue. Tracing allows you to see any traffic happening | ||
| 346 | on a block device queue. For more information (and the userspace | ||
| 347 | support tools needed), fetch the blktrace tools from: | ||
| 348 | |||
| 349 | git://git.kernel.dk/blktrace.git | ||
| 350 | |||
| 351 | Tracing also is possible using the ftrace interface, e.g.: | ||
| 352 | |||
| 353 | echo 1 > /sys/block/sda/sda1/trace/enable | ||
| 354 | echo blk > /sys/kernel/debug/tracing/current_tracer | ||
| 355 | cat /sys/kernel/debug/tracing/trace_pipe | ||
| 356 | |||
| 357 | If unsure, say N. | ||
| 358 | |||
| 269 | config DYNAMIC_FTRACE | 359 | config DYNAMIC_FTRACE |
| 270 | bool "enable/disable ftrace tracepoints dynamically" | 360 | bool "enable/disable ftrace tracepoints dynamically" |
| 271 | depends on FUNCTION_TRACER | 361 | depends on FUNCTION_TRACER |
| 272 | depends on HAVE_DYNAMIC_FTRACE | 362 | depends on HAVE_DYNAMIC_FTRACE |
| 273 | depends on DEBUG_KERNEL | ||
| 274 | default y | 363 | default y |
| 275 | help | 364 | help |
| 276 | This option will modify all the calls to ftrace dynamically | 365 | This option will modify all the calls to ftrace dynamically |
| @@ -296,7 +385,7 @@ config FTRACE_SELFTEST | |||
| 296 | 385 | ||
| 297 | config FTRACE_STARTUP_TEST | 386 | config FTRACE_STARTUP_TEST |
| 298 | bool "Perform a startup test on ftrace" | 387 | bool "Perform a startup test on ftrace" |
| 299 | depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER | 388 | depends on TRACING |
| 300 | select FTRACE_SELFTEST | 389 | select FTRACE_SELFTEST |
| 301 | help | 390 | help |
| 302 | This option performs a series of startup tests on ftrace. On bootup | 391 | This option performs a series of startup tests on ftrace. On bootup |
| @@ -306,7 +395,7 @@ config FTRACE_STARTUP_TEST | |||
| 306 | 395 | ||
| 307 | config MMIOTRACE | 396 | config MMIOTRACE |
| 308 | bool "Memory mapped IO tracing" | 397 | bool "Memory mapped IO tracing" |
| 309 | depends on HAVE_MMIOTRACE_SUPPORT && DEBUG_KERNEL && PCI | 398 | depends on HAVE_MMIOTRACE_SUPPORT && PCI |
| 310 | select TRACING | 399 | select TRACING |
| 311 | help | 400 | help |
| 312 | Mmiotrace traces Memory Mapped I/O access and is meant for | 401 | Mmiotrace traces Memory Mapped I/O access and is meant for |
| @@ -314,7 +403,7 @@ config MMIOTRACE | |||
| 314 | implementation and works via page faults. Tracing is disabled by | 403 | implementation and works via page faults. Tracing is disabled by |
| 315 | default and can be enabled at run-time. | 404 | default and can be enabled at run-time. |
| 316 | 405 | ||
| 317 | See Documentation/tracers/mmiotrace.txt. | 406 | See Documentation/trace/mmiotrace.txt. |
| 318 | If you are not helping to develop drivers, say N. | 407 | If you are not helping to develop drivers, say N. |
| 319 | 408 | ||
| 320 | config MMIOTRACE_TEST | 409 | config MMIOTRACE_TEST |
| @@ -328,3 +417,6 @@ config MMIOTRACE_TEST | |||
| 328 | Say N, unless you absolutely know what you are doing. | 417 | Say N, unless you absolutely know what you are doing. |
| 329 | 418 | ||
| 330 | endmenu | 419 | endmenu |
| 420 | |||
| 421 | endif # TRACING_SUPPORT | ||
| 422 | |||
