aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sched.h6
-rw-r--r--kernel/sched.c2
-rw-r--r--kernel/trace/trace_sched_wakeup.c13
3 files changed, 4 insertions, 17 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6e26f1fdbfe2..05744f9cb096 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2130,17 +2130,11 @@ ftrace_ctx_switch(struct task_struct *prev, struct task_struct *next)
2130#ifdef CONFIG_SCHED_TRACER 2130#ifdef CONFIG_SCHED_TRACER
2131extern void 2131extern void
2132ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr); 2132ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr);
2133extern void
2134ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr);
2135#else 2133#else
2136static inline void 2134static inline void
2137ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr) 2135ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr)
2138{ 2136{
2139} 2137}
2140static inline void
2141ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr)
2142{
2143}
2144#endif 2138#endif
2145 2139
2146extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask); 2140extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask);
diff --git a/kernel/sched.c b/kernel/sched.c
index 328494e28df2..53ab1174664f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2613,7 +2613,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
2613 p->sched_class->task_new(rq, p); 2613 p->sched_class->task_new(rq, p);
2614 inc_nr_running(rq); 2614 inc_nr_running(rq);
2615 } 2615 }
2616 ftrace_wake_up_new_task(p, rq->curr); 2616 ftrace_wake_up_task(p, rq->curr);
2617 check_preempt_curr(rq, p); 2617 check_preempt_curr(rq, p);
2618#ifdef CONFIG_SMP 2618#ifdef CONFIG_SMP
2619 if (p->sched_class->task_wake_up) 2619 if (p->sched_class->task_wake_up)
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c
index 87fa7b253b57..2a012423f9d0 100644
--- a/kernel/trace/trace_sched_wakeup.c
+++ b/kernel/trace/trace_sched_wakeup.c
@@ -201,20 +201,13 @@ out:
201 atomic_dec(&tr->data[cpu]->disabled); 201 atomic_dec(&tr->data[cpu]->disabled);
202} 202}
203 203
204void 204void wakeup_sched_wakeup(struct task_struct *wakee, struct task_struct *curr)
205wakeup_sched_wakeup(struct task_struct *wakee, struct task_struct *curr)
206{ 205{
207 if (likely(!tracer_enabled)) 206 if (likely(!tracer_enabled))
208 return; 207 return;
209 208
210 wakeup_check_start(wakeup_trace, wakee, curr); 209 tracing_record_cmdline(curr);
211} 210 tracing_record_cmdline(wakee);
212
213void
214ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr)
215{
216 if (likely(!tracer_enabled))
217 return;
218 211
219 wakeup_check_start(wakeup_trace, wakee, curr); 212 wakeup_check_start(wakeup_trace, wakee, curr);
220} 213}