diff options
-rw-r--r-- | kernel/trace/Kconfig | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 590a27fc212f..f78eab251897 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
@@ -192,6 +192,7 @@ config IRQSOFF_TRACER | |||
192 | select TRACER_MAX_TRACE | 192 | select TRACER_MAX_TRACE |
193 | select RING_BUFFER_ALLOW_SWAP | 193 | select RING_BUFFER_ALLOW_SWAP |
194 | select TRACER_SNAPSHOT | 194 | select TRACER_SNAPSHOT |
195 | select TRACER_SNAPSHOT_PER_CPU_SWAP | ||
195 | help | 196 | help |
196 | This option measures the time spent in irqs-off critical | 197 | This option measures the time spent in irqs-off critical |
197 | sections, with microsecond accuracy. | 198 | sections, with microsecond accuracy. |
@@ -215,6 +216,7 @@ config PREEMPT_TRACER | |||
215 | select TRACER_MAX_TRACE | 216 | select TRACER_MAX_TRACE |
216 | select RING_BUFFER_ALLOW_SWAP | 217 | select RING_BUFFER_ALLOW_SWAP |
217 | select TRACER_SNAPSHOT | 218 | select TRACER_SNAPSHOT |
219 | select TRACER_SNAPSHOT_PER_CPU_SWAP | ||
218 | help | 220 | help |
219 | This option measures the time spent in preemption-off critical | 221 | This option measures the time spent in preemption-off critical |
220 | sections, with microsecond accuracy. | 222 | sections, with microsecond accuracy. |
@@ -266,6 +268,27 @@ config TRACER_SNAPSHOT | |||
266 | echo 1 > /sys/kernel/debug/tracing/snapshot | 268 | echo 1 > /sys/kernel/debug/tracing/snapshot |
267 | cat snapshot | 269 | cat snapshot |
268 | 270 | ||
271 | config TRACER_SNAPSHOT_PER_CPU_SWAP | ||
272 | bool "Allow snapshot to swap per CPU" | ||
273 | depends on TRACER_SNAPSHOT | ||
274 | select RING_BUFFER_ALLOW_SWAP | ||
275 | help | ||
276 | Allow doing a snapshot of a single CPU buffer instead of a | ||
277 | full swap (all buffers). If this is set, then the following is | ||
278 | allowed: | ||
279 | |||
280 | echo 1 > /sys/kernel/debug/tracing/per_cpu/cpu2/snapshot | ||
281 | |||
282 | After which, only the tracing buffer for CPU 2 was swapped with | ||
283 | the main tracing buffer, and the other CPU buffers remain the same. | ||
284 | |||
285 | When this is enabled, this adds a little more overhead to the | ||
286 | trace recording, as it needs to add some checks to synchronize | ||
287 | recording with swaps. But this does not affect the performance | ||
288 | of the overall system. This is enabled by default when the preempt | ||
289 | or irq latency tracers are enabled, as those need to swap as well | ||
290 | and already adds the overhead (plus a lot more). | ||
291 | |||
269 | config TRACE_BRANCH_PROFILING | 292 | config TRACE_BRANCH_PROFILING |
270 | bool | 293 | bool |
271 | select GENERIC_TRACER | 294 | select GENERIC_TRACER |