aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 15:20:52 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 15:04:51 -0400
commit24cd5d111e8c713e62cda7ca1d01232402e3d3c9 (patch)
treec85834d19b895a9c27137b9ce4d0dbdb3db3aaf7 /kernel/sched.c
parent4e65551905fb0300ae7e667cbaa41ee2e3f29a13 (diff)
ftrace: trace curr/next tasks
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.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index b9208a0e33a0..673b588b713b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2398,8 +2398,8 @@ static int sched_balance_self(int cpu, int flag)
2398 2398
2399void ftrace_all_fair_tasks(void *__rq, void *__tr, void *__data) 2399void ftrace_all_fair_tasks(void *__rq, void *__tr, void *__data)
2400{ 2400{
2401 struct sched_entity *se;
2402 struct task_struct *p; 2401 struct task_struct *p;
2402 struct sched_entity *se;
2403 struct rb_node *curr; 2403 struct rb_node *curr;
2404 struct rq *rq = __rq; 2404 struct rq *rq = __rq;
2405 2405
@@ -2407,6 +2407,17 @@ void ftrace_all_fair_tasks(void *__rq, void *__tr, void *__data)
2407 if (!curr) 2407 if (!curr)
2408 return; 2408 return;
2409 2409
2410 if (rq->cfs.curr) {
2411 p = task_of(rq->cfs.curr);
2412 __trace_special(__tr, __data,
2413 p->pid, p->se.vruntime, p->se.sum_exec_runtime);
2414 }
2415 if (rq->cfs.next) {
2416 p = task_of(rq->cfs.next);
2417 __trace_special(__tr, __data,
2418 p->pid, p->se.vruntime, p->se.sum_exec_runtime);
2419 }
2420
2410 while (curr) { 2421 while (curr) {
2411 se = rb_entry(curr, struct sched_entity, run_node); 2422 se = rb_entry(curr, struct sched_entity, run_node);
2412 if (!entity_is_task(se)) 2423 if (!entity_is_task(se))