]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Remove NR_CPUS array from trace_iterator
authorSteven Rostedt <srostedt@redhat.com>
Thu, 28 Jun 2012 00:46:14 +0000 (20:46 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 28 Jun 2012 17:52:15 +0000 (13:52 -0400)
commit109fdc7f539d5a08651db4bda98186045c0d06a7
treec3937902e8ef5196638a9c31fd3b6280540a101d
parent1b9760e6dc448af0d150635902d6d0121ac34e35
tracing: Remove NR_CPUS array from trace_iterator

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: Dave Jones <davej@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/ftrace_event.h
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_functions_graph.c