aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_sched_switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_sched_switch.c')
-rw-r--r--kernel/trace/trace_sched_switch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c
index 12658b3f2b28..5555b906a666 100644
--- a/kernel/trace/trace_sched_switch.c
+++ b/kernel/trace/trace_sched_switch.c
@@ -36,7 +36,8 @@ ctx_switch_func(void *__rq, struct task_struct *prev, struct task_struct *next)
36 36
37 if (likely(disabled == 1)) { 37 if (likely(disabled == 1)) {
38 tracing_sched_switch_trace(tr, data, prev, next, flags); 38 tracing_sched_switch_trace(tr, data, prev, next, flags);
39 ftrace_all_fair_tasks(__rq, tr, data); 39 if (trace_flags & TRACE_ITER_SCHED_TREE)
40 ftrace_all_fair_tasks(__rq, tr, data);
40 } 41 }
41 42
42 atomic_dec(&data->disabled); 43 atomic_dec(&data->disabled);
@@ -62,7 +63,8 @@ wakeup_func(void *__rq, struct task_struct *wakee, struct task_struct *curr)
62 63
63 if (likely(disabled == 1)) { 64 if (likely(disabled == 1)) {
64 tracing_sched_wakeup_trace(tr, data, wakee, curr, flags); 65 tracing_sched_wakeup_trace(tr, data, wakee, curr, flags);
65 ftrace_all_fair_tasks(__rq, tr, data); 66 if (trace_flags & TRACE_ITER_SCHED_TREE)
67 ftrace_all_fair_tasks(__rq, tr, data);
66 } 68 }
67 69
68 atomic_dec(&data->disabled); 70 atomic_dec(&data->disabled);