summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-12-15 20:13:31 -0500
committerSteven Rostedt <rostedt@goodmis.org>2014-12-22 15:39:40 -0500
commitcf6ab6d9143b157786bf29bca5c32e55234bb07d (patch)
treea0c044f2bc377065ba823d08fbb33cb212c0148b /kernel/trace/trace.h
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
downloadtalos-obmc-linux-cf6ab6d9143b157786bf29bca5c32e55234bb07d.tar.gz
talos-obmc-linux-cf6ab6d9143b157786bf29bca5c32e55234bb07d.zip
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>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 8de48bac1ce2..0eddfeb05fee 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -388,6 +388,7 @@ struct tracer {
struct tracer *next;
struct tracer_flags *flags;
int enabled;
+ int ref;
bool print_max;
bool allow_instances;
#ifdef CONFIG_TRACER_MAX_TRACE
OpenPOWER on IntegriCloud