As tracers will soon be used by instances, the tracer enabled field
needs to be converted to a counter instead of a boolean.
This counter is protected by the trace_types_lock mutex.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
if (tr->current_trace == &nop_trace)
return;
if (tr->current_trace == &nop_trace)
return;
- tr->current_trace->enabled = false;
+ tr->current_trace->enabled--;
if (tr->current_trace->reset)
tr->current_trace->reset(tr);
if (tr->current_trace->reset)
tr->current_trace->reset(tr);
- tr->current_trace->enabled = false;
+ tr->current_trace->enabled--;
if (tr->current_trace->reset)
tr->current_trace->reset(tr);
if (tr->current_trace->reset)
tr->current_trace->reset(tr);
- tr->current_trace->enabled = true;
+ tr->current_trace->enabled++;
trace_branch_enable(tr);
out:
mutex_unlock(&trace_types_lock);
trace_branch_enable(tr);
out:
mutex_unlock(&trace_types_lock);
u32 mask, int set);
struct tracer *next;
struct tracer_flags *flags;
u32 mask, int set);
struct tracer *next;
struct tracer_flags *flags;
bool allow_instances;
#ifdef CONFIG_TRACER_MAX_TRACE
bool use_max_tr;
bool allow_instances;
#ifdef CONFIG_TRACER_MAX_TRACE
bool use_max_tr;