• Steven Rostedt's avatar
    tracing: Remove NR_CPUS array from trace_iterator · 6d158a81
    Steven Rostedt authored
    Replace the NR_CPUS array of buffer_iter from the trace_iterator
    with an allocated array. This will just create an array of
    possible CPUS instead of the max number specified.
    
    The use of NR_CPUS in that array caused allocation failures for
    machines that were tight on memory. This did not cause any failures
    to the system itself (no crashes), but caused unnecessary failures
    for reading the trace files.
    
    Added a helper function called 'trace_buffer_iter()' that returns
    the buffer_iter item or NULL if it is not defined or the array was
    not allocated. Some routines do not require the array
    (tracing_open_pipe() for one).
    Reported-by: default avatarDave Jones <davej@redhat.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    6d158a81
trace.c 117 KB