diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-01-14 10:04:59 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-04-21 13:59:27 -0400 |
commit | 0b9b12c1b884eb34773312f15c194220025e0416 (patch) | |
tree | ffe346fc3ec3b5d188f3a278d73ba3c55a64bd10 /kernel/trace/trace.h | |
parent | 6d9b3fa5e7f663bbfb9d2d80d46136f75319cb28 (diff) |
tracing: Move ftrace_max_lock into trace_array
In preparation for having tracers enabled in instances, the max_lock
should be unique as updating the max for one tracer is a separate
operation than updating it for another tracer using a different max.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 644a8b533e1d..5d2f07d6746c 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -192,6 +192,20 @@ struct trace_array { | |||
192 | bool allocated_snapshot; | 192 | bool allocated_snapshot; |
193 | unsigned long max_latency; | 193 | unsigned long max_latency; |
194 | #endif | 194 | #endif |
195 | /* | ||
196 | * max_lock is used to protect the swapping of buffers | ||
197 | * when taking a max snapshot. The buffers themselves are | ||
198 | * protected by per_cpu spinlocks. But the action of the swap | ||
199 | * needs its own lock. | ||
200 | * | ||
201 | * This is defined as a arch_spinlock_t in order to help | ||
202 | * with performance when lockdep debugging is enabled. | ||
203 | * | ||
204 | * It is also used in other places outside the update_max_tr | ||
205 | * so it needs to be defined outside of the | ||
206 | * CONFIG_TRACER_MAX_TRACE. | ||
207 | */ | ||
208 | arch_spinlock_t max_lock; | ||
195 | int buffer_disabled; | 209 | int buffer_disabled; |
196 | #ifdef CONFIG_FTRACE_SYSCALLS | 210 | #ifdef CONFIG_FTRACE_SYSCALLS |
197 | int sys_refcount_enter; | 211 | int sys_refcount_enter; |