summaryrefslogtreecommitdiff
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 21:20:41 +0200
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 20:30:55 +0200
commitbd3bff9e20f454b242d979ec2f9a4dca0d5fa06f (patch)
treef9aa5959cb63a0c9d51185109264dd0b0f547765 /kernel/sched.c
parent75d3bce2fc0a80f435fe12f2c9ed2632c8ac29e4 (diff)
sched: add latency tracer callbacks to the scheduler
add 3 lightweight callbacks to the tracer backend. zero impact if tracing is turned off. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index cfa222a91539..463dcdb36ef8 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2467,6 +2467,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
out_activate:
#endif /* CONFIG_SMP */
+ ftrace_wake_up_task(p, rq->curr);
schedstat_inc(p, se.nr_wakeups);
if (sync)
schedstat_inc(p, se.nr_wakeups_sync);
@@ -2611,6 +2612,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
p->sched_class->task_new(rq, p);
inc_nr_running(rq);
}
+ ftrace_wake_up_new_task(p, rq->curr);
check_preempt_curr(rq, p);
#ifdef CONFIG_SMP
if (p->sched_class->task_wake_up)
@@ -2783,6 +2785,7 @@ context_switch(struct rq *rq, struct task_struct *prev,
struct mm_struct *mm, *oldmm;
prepare_task_switch(rq, prev, next);
+ ftrace_ctx_switch(prev, next);
mm = next->mm;
oldmm = prev->active_mm;
/*