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>
This commit is contained in:

committed by
Steven Rostedt

parent
6d9b3fa5e7
commit
0b9b12c1b8
@@ -192,6 +192,20 @@ struct trace_array {
|
||||
bool allocated_snapshot;
|
||||
unsigned long max_latency;
|
||||
#endif
|
||||
/*
|
||||
* max_lock is used to protect the swapping of buffers
|
||||
* when taking a max snapshot. The buffers themselves are
|
||||
* protected by per_cpu spinlocks. But the action of the swap
|
||||
* needs its own lock.
|
||||
*
|
||||
* This is defined as a arch_spinlock_t in order to help
|
||||
* with performance when lockdep debugging is enabled.
|
||||
*
|
||||
* It is also used in other places outside the update_max_tr
|
||||
* so it needs to be defined outside of the
|
||||
* CONFIG_TRACER_MAX_TRACE.
|
||||
*/
|
||||
arch_spinlock_t max_lock;
|
||||
int buffer_disabled;
|
||||
#ifdef CONFIG_FTRACE_SYSCALLS
|
||||
int sys_refcount_enter;
|
||||
|
Reference in New Issue
Block a user