Commit 717a9ef7 authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Steven Rostedt

tracing: Remove unneeded checks from the stack tracer

It seems that 'ftrace_enabled' flag should not be used inside the tracer
functions. The ftrace core is using this flag for internal purposes, and
the flag wasn't meant to be used in tracers' runtime checks.

stack tracer is the only tracer that abusing the flag. So stop it from
serving as a bad example.

Also, there is a local 'stack_trace_disabled' flag in the stack tracer,
which is never updated; so it can be removed as well.

Link: default avatarAnton Vorontsov <>
Signed-off-by: default avatarSteven Rostedt <>
parent d60da506
......@@ -33,7 +33,6 @@ static unsigned long max_stack_size;
static arch_spinlock_t max_stack_lock =
static int stack_trace_disabled __read_mostly;
static DEFINE_PER_CPU(int, trace_active);
static DEFINE_MUTEX(stack_sysctl_mutex);
......@@ -116,9 +115,6 @@ stack_trace_call(unsigned long ip, unsigned long parent_ip,
int cpu;
if (unlikely(!ftrace_enabled || stack_trace_disabled))
cpu = raw_smp_processor_id();
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment