From 990d51d6562a399595f0f6fca11d09b4a2ac513d Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Mon, 5 May 2008 14:32:06 -0400 Subject: GSN-EDF: log relinking decisions For debugging, make relinking optimizations available in the TRACE() log. --- litmus/sched_gsn_edf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index 08069abe1c..b8dc0b1f8e 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c @@ -179,6 +179,9 @@ static noinline void link_task_to_cpu(struct task_struct* linked, * the caller to get things right. */ if (entry != sched) { + TRACE_TASK(linked, + "already scheduled on %d, updating link.\n", + sched->cpu); tmp = sched->linked; linked->rt_param.linked_on = sched->cpu; sched->linked = linked; @@ -190,6 +193,10 @@ static noinline void link_task_to_cpu(struct task_struct* linked, linked->rt_param.linked_on = entry->cpu; } entry->linked = linked; + if (linked) + TRACE_TASK(linked, "linked to %d.\n", entry->cpu); + else + TRACE("NULL linked to %d.\n", entry->cpu); update_cpu_position(entry); } @@ -409,6 +416,8 @@ static struct task_struct* gsnedf_schedule(struct task_struct * prev) sleep = exists && get_rt_flags(entry->scheduled) == RT_F_SLEEP; preempt = entry->scheduled != entry->linked; + TRACE_TASK(prev, "invoked gsnedf_schedule.\n"); + if (exists) TRACE_TASK(prev, "blocks:%d out_of_time:%d np:%d sleep:%d preempt:%d " -- cgit v1.2.2