ftrace: sched tracer fix
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
86387f7ee5
commit
8ac0fca4cc
|
@ -2130,17 +2130,11 @@ ftrace_ctx_switch(struct task_struct *prev, struct task_struct *next)
|
||||||
#ifdef CONFIG_SCHED_TRACER
|
#ifdef CONFIG_SCHED_TRACER
|
||||||
extern void
|
extern void
|
||||||
ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr);
|
ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr);
|
||||||
extern void
|
|
||||||
ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr);
|
|
||||||
#else
|
#else
|
||||||
static inline void
|
static inline void
|
||||||
ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr)
|
ftrace_wake_up_task(struct task_struct *wakee, struct task_struct *curr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
static inline void
|
|
||||||
ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask);
|
extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask);
|
||||||
|
|
|
@ -2613,7 +2613,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
|
||||||
p->sched_class->task_new(rq, p);
|
p->sched_class->task_new(rq, p);
|
||||||
inc_nr_running(rq);
|
inc_nr_running(rq);
|
||||||
}
|
}
|
||||||
ftrace_wake_up_new_task(p, rq->curr);
|
ftrace_wake_up_task(p, rq->curr);
|
||||||
check_preempt_curr(rq, p);
|
check_preempt_curr(rq, p);
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
if (p->sched_class->task_wake_up)
|
if (p->sched_class->task_wake_up)
|
||||||
|
|
|
@ -201,20 +201,13 @@ out:
|
||||||
atomic_dec(&tr->data[cpu]->disabled);
|
atomic_dec(&tr->data[cpu]->disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void wakeup_sched_wakeup(struct task_struct *wakee, struct task_struct *curr)
|
||||||
wakeup_sched_wakeup(struct task_struct *wakee, struct task_struct *curr)
|
|
||||||
{
|
{
|
||||||
if (likely(!tracer_enabled))
|
if (likely(!tracer_enabled))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wakeup_check_start(wakeup_trace, wakee, curr);
|
tracing_record_cmdline(curr);
|
||||||
}
|
tracing_record_cmdline(wakee);
|
||||||
|
|
||||||
void
|
|
||||||
ftrace_wake_up_new_task(struct task_struct *wakee, struct task_struct *curr)
|
|
||||||
{
|
|
||||||
if (likely(!tracer_enabled))
|
|
||||||
return;
|
|
||||||
|
|
||||||
wakeup_check_start(wakeup_trace, wakee, curr);
|
wakeup_check_start(wakeup_trace, wakee, curr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue