OSDN Git Service

tracing: Add ref count to tracer for when they are being read by pipe
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 16 Dec 2014 01:13:31 +0000 (20:13 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 22 Dec 2014 20:39:40 +0000 (15:39 -0500)
commitcf6ab6d9143b157786bf29bca5c32e55234bb07d
treea0c044f2bc377065ba823d08fbb33cb212c0148b
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672
tracing: Add ref count to tracer for when they are being read by pipe

When one of the trace pipe files are being read (by either the trace_pipe
or trace_pipe_raw), do not allow the current_trace to change. By adding
a ref count that is incremented when the pipe files are opened, will
prevent the current_trace from being changed.

This will allow for the removal of the global trace_types_lock from
reading the pipe buffers (which is currently a bottle neck).

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