aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2008-05-12 15:21:10 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 16:29:25 -0400
commit5b82a1b08a00b2adca3d9dd9777efff40b7aaaa1 (patch)
tree4dcce4af592ca177bee3dfeb34f9b482d142e713 /kernel/sched.c
parent0aa977f592f17004f9d1d545f2e1bb9ea71896c3 (diff)
Port ftrace to markers
Porting ftrace to the marker infrastructure. Don't need to chain to the wakeup tracer from the sched tracer, because markers support multiple probes connected. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Steven Rostedt <rostedt@goodmis.org> 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.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index ad95cca4e42e..e2e985eeee78 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2500,7 +2500,9 @@ out_activate:
2500 success = 1; 2500 success = 1;
2501 2501
2502out_running: 2502out_running:
2503 ftrace_wake_up_task(rq, p, rq->curr); 2503 trace_mark(kernel_sched_wakeup,
2504 "pid %d state %ld ## rq %p task %p rq->curr %p",
2505 p->pid, p->state, rq, p, rq->curr);
2504 check_preempt_curr(rq, p); 2506 check_preempt_curr(rq, p);
2505 2507
2506 p->state = TASK_RUNNING; 2508 p->state = TASK_RUNNING;
@@ -2631,7 +2633,9 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
2631 p->sched_class->task_new(rq, p); 2633 p->sched_class->task_new(rq, p);
2632 inc_nr_running(rq); 2634 inc_nr_running(rq);
2633 } 2635 }
2634 ftrace_wake_up_task(rq, p, rq->curr); 2636 trace_mark(kernel_sched_wakeup_new,
2637 "pid %d state %ld ## rq %p task %p rq->curr %p",
2638 p->pid, p->state, rq, p, rq->curr);
2635 check_preempt_curr(rq, p); 2639 check_preempt_curr(rq, p);
2636#ifdef CONFIG_SMP 2640#ifdef CONFIG_SMP
2637 if (p->sched_class->task_wake_up) 2641 if (p->sched_class->task_wake_up)
@@ -2804,7 +2808,11 @@ context_switch(struct rq *rq, struct task_struct *prev,
2804 struct mm_struct *mm, *oldmm; 2808 struct mm_struct *mm, *oldmm;
2805 2809
2806 prepare_task_switch(rq, prev, next); 2810 prepare_task_switch(rq, prev, next);
2807 ftrace_ctx_switch(rq, prev, next); 2811 trace_mark(kernel_sched_schedule,
2812 "prev_pid %d next_pid %d prev_state %ld "
2813 "## rq %p prev %p next %p",
2814 prev->pid, next->pid, prev->state,
2815 rq, prev, next);
2808 mm = next->mm; 2816 mm = next->mm;
2809 oldmm = prev->active_mm; 2817 oldmm = prev->active_mm;
2810 /* 2818 /*