aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-05-12 21:20:52 +0200
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 21:04:51 +0200
commit24cd5d111e8c713e62cda7ca1d01232402e3d3c9 (patch)
treec85834d19b895a9c27137b9ce4d0dbdb3db3aaf7 /kernel
parent4e65551905fb0300ae7e667cbaa41ee2e3f29a13 (diff)
downloadkernel_samsung_aries-24cd5d111e8c713e62cda7ca1d01232402e3d3c9.zip
kernel_samsung_aries-24cd5d111e8c713e62cda7ca1d01232402e3d3c9.tar.gz
kernel_samsung_aries-24cd5d111e8c713e62cda7ca1d01232402e3d3c9.tar.bz2
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')
-rw-r--r--kernel/sched.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index b9208a0..673b588 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2398,8 +2398,8 @@ static int sched_balance_self(int cpu, int flag)
void ftrace_all_fair_tasks(void *__rq, void *__tr, void *__data)
{
- struct sched_entity *se;
struct task_struct *p;
+ struct sched_entity *se;
struct rb_node *curr;
struct rq *rq = __rq;
@@ -2407,6 +2407,17 @@ void ftrace_all_fair_tasks(void *__rq, void *__tr, void *__data)
if (!curr)
return;
+ if (rq->cfs.curr) {
+ p = task_of(rq->cfs.curr);
+ __trace_special(__tr, __data,
+ p->pid, p->se.vruntime, p->se.sum_exec_runtime);
+ }
+ if (rq->cfs.next) {
+ p = task_of(rq->cfs.next);
+ __trace_special(__tr, __data,
+ p->pid, p->se.vruntime, p->se.sum_exec_runtime);
+ }
+
while (curr) {
se = rb_entry(curr, struct sched_entity, run_node);
if (!entity_is_task(se))