]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Add config option to allow snapshot to swap per cpu
authorSteven Rostedt (Red Hat) <srostedt@redhat.com>
Tue, 5 Mar 2013 19:50:23 +0000 (14:50 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 15 Mar 2013 04:35:47 +0000 (00:35 -0400)
commita56ba7076936625333ae2b30005201d21b6b95af
treee74d33f01afe541d82f02ba727c421ea71ed470a
parentcaf75eefa3b30a4ba6cc2616902db994a2c027f3
tracing: Add config option to allow snapshot to swap per cpu

When the preempt or irq latency tracers are enabled, they require
the ring buffer to be able to swap the per cpu sub buffers between
two main buffers. This adds a slight overhead to tracing as the
trace recording needs to perform some checks to synchronize
between recording and swaps that might be happening on other CPUs.

The config RING_BUFFER_ALLOW_SWAP is set when a user of the ring
buffer needs the "swap cpu" feature, otherwise the extra checks
are not implemented and removed from the tracing overhead.

The snapshot feature will swap per CPU if the RING_BUFFER_ALLOW_SWAP
config is set. But that only gets set by things like OPROFILE
and the irqs and preempt latency tracers.

This config is added to let the user decide to include this feature
with the snapshot agnostic from whether or not another user of
the ring buffer sets this config.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/Kconfig