ftrace: Add check of sched_stopped for probe_sched_wakeup

The wakeup tracing in sched_switch does not stop when a user
disables tracing. This is because the probe_sched_wakeup() is missing
the check to prevent the wakeup from being traced.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
LKML-Reference: <49D1C543.3010307@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Zhaolei and committed by
Ingo Molnar
8bcae09b 5ac9f622

+3
+3
kernel/trace/trace_sched_switch.c
··· 62 62 pc = preempt_count(); 63 63 tracing_record_cmdline(current); 64 64 65 + if (sched_stopped) 66 + return; 67 + 65 68 local_irq_save(flags); 66 69 cpu = raw_smp_processor_id(); 67 70 data = ctx_trace->data[cpu];