• Steven Rostedt (Red Hat)'s avatar
    tracing: Add config option to allow snapshot to swap per cpu · 0b85ffc2
    Steven Rostedt (Red Hat) authored
    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: default avatarSteven Rostedt <rostedt@goodmis.org>
    0b85ffc2
Kconfig 16.7 KB