Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50512ab5 authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt
Browse files

tracing: Convert tracer->enabled to counter



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: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 6b450d25
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3916,7 +3916,7 @@ static void tracing_set_nop(struct trace_array *tr)
	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);
@@ -3962,7 +3962,7 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)

	trace_branch_disable();

	tr->current_trace->enabled = false;
	tr->current_trace->enabled--;

	if (tr->current_trace->reset)
		tr->current_trace->reset(tr);
@@ -4006,7 +4006,7 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)
	}

	tr->current_trace = t;
	tr->current_trace->enabled = true;
	tr->current_trace->enabled++;
	trace_branch_enable(tr);
 out:
	mutex_unlock(&trace_types_lock);
+1 −1
Original line number Diff line number Diff line
@@ -362,8 +362,8 @@ struct tracer {
						u32 mask, int set);
	struct tracer		*next;
	struct tracer_flags	*flags;
	int			enabled;
	bool			print_max;
	bool			enabled;
	bool			allow_instances;
#ifdef CONFIG_TRACER_MAX_TRACE
	bool			use_max_tr;