Skip to content

Commit

Permalink
tracing: Remove unneeded checks from the stack tracer
Browse files Browse the repository at this point in the history
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: http://lkml.kernel.org/r/1342637761-9655-1-git-send-email-anton.vorontsov@linaro.org

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Anton Vorontsov authored and Steven Rostedt committed Nov 19, 2012
1 parent d60da50 commit 717a9ef
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions kernel/trace/trace_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ static unsigned long max_stack_size;
static arch_spinlock_t max_stack_lock =
(arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED;

static int stack_trace_disabled __read_mostly;
static DEFINE_PER_CPU(int, trace_active);
static DEFINE_MUTEX(stack_sysctl_mutex);

Expand Down Expand Up @@ -116,9 +115,6 @@ stack_trace_call(unsigned long ip, unsigned long parent_ip,
{
int cpu;

if (unlikely(!ftrace_enabled || stack_trace_disabled))
return;

preempt_disable_notrace();

cpu = raw_smp_processor_id();
Expand Down

0 comments on commit 717a9ef

Please sign in to comment.