Skip to content

Commit 717a9ef

Browse files
Anton Vorontsovrostedt
authored andcommitted
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: 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>
1 parent d60da50 commit 717a9ef

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎kernel/trace/trace_stack.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ static unsigned long max_stack_size;
3333
static arch_spinlock_t max_stack_lock =
3434
(arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED;
3535

36-
static int stack_trace_disabled __read_mostly;
3736
static DEFINE_PER_CPU(int, trace_active);
3837
static DEFINE_MUTEX(stack_sysctl_mutex);
3938

@@ -116,9 +115,6 @@ stack_trace_call(unsigned long ip, unsigned long parent_ip,
116115
{
117116
int cpu;
118117

119-
if (unlikely(!ftrace_enabled || stack_trace_disabled))
120-
return;
121-
122118
preempt_disable_notrace();
123119

124120
cpu = raw_smp_processor_id();

0 commit comments

Comments
 (0)