• S
    tracing: keep ring buffer to minimum size till used · 73c5162a
    Steven Rostedt 提交于
    Impact: less memory impact on systems not using tracer
    
    When the kernel boots up that has tracing configured, it allocates
    the default size of the ring buffer. This currently happens to be
    1.4Megs per possible CPU. This is quite a bit of wasted memory if
    the system is never using the tracer.
    
    The current solution is to keep the ring buffers to a minimum size
    until the user uses them. Once a tracer is piped into the current_tracer
    the ring buffer will be expanded to the default size. If the user
    changes the size of the ring buffer, it will take the size given
    by the user immediately.
    
    If the user adds a "ftrace=" to the kernel command line, then the ring
    buffers will be set to the default size on initialization.
    Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
    73c5162a
trace.c 89.6 KB