From 61ce17e3edbf33e49adb5536c9904b735e58c774 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Fri, 7 Oct 2011 18:49:22 -0400 Subject: Newline consistency... --- include/litmus/sched_mc.h | 2 +- litmus/ce_domain.c | 6 +++--- litmus/sched_mc.c | 42 +++++++++++++++++++++--------------------- litmus/sched_mc_ce.c | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/litmus/sched_mc.h b/include/litmus/sched_mc.h index 7088c0766db2..431e2c1fc2f6 100644 --- a/include/litmus/sched_mc.h +++ b/include/litmus/sched_mc.h @@ -43,7 +43,7 @@ struct mc_data { sched_trace_log_message("%d P%d [%s@%s:%d]: " fmt, \ TRACE_ARGS, ## args) #define TRACE_MC_TASK(t, fmt, args...) \ - STRACE(TS " " fmt "\n", TA(t), ##args) + STRACE(TS " " fmt, TA(t), ##args) /* * The MC-CE scheduler uses this as domain data. diff --git a/litmus/ce_domain.c b/litmus/ce_domain.c index 54a4a18e01b7..c3ddc9dd63ad 100644 --- a/litmus/ce_domain.c +++ b/litmus/ce_domain.c @@ -27,15 +27,15 @@ void ce_requeue(domain_t *dom, struct task_struct *ts) const int asleep = RT_F_SLEEP == get_rt_flags(ts); TRACE_MC_TASK(ts, "entered ce_requeue. asleep: %d just_finished: %3u " - "expected_job: %3u", + "expected_job: %3u\n", asleep, just_finished, expected_job); /* When coming from job completion, the task will be asleep. */ if (asleep && just_finished < expected_job) { - TRACE_MC_TASK(ts, "appears behind"); + TRACE_MC_TASK(ts, "appears behind\n"); } else if (asleep && expected_job < just_finished) { TRACE_MC_TASK(ts, "job %u completed in expected job %u which " - "seems too early", just_finished, + "seems too early\n", just_finished, expected_job); } } diff --git a/litmus/sched_mc.c b/litmus/sched_mc.c index 90a60c568183..b2a9ca205be4 100644 --- a/litmus/sched_mc.c +++ b/litmus/sched_mc.c @@ -69,9 +69,9 @@ static int interrupt_cpu; (container_of((void*)((ce) - (ce)->level), struct cpu_entry, crit_entries)) #define get_crit_entry_for(cpu, level) (&per_cpu(cpus, cpu).crit_entries[level]) #define TRACE_ENTRY(e, fmt, args...) \ - STRACE("P%d, linked=" TS " " fmt "\n", e->cpu, TA(e->linked), ##args) + STRACE("P%d, linked=" TS " " fmt, e->cpu, TA(e->linked), ##args) #define TRACE_CRIT_ENTRY(ce, fmt, args...) \ - STRACE("%s P%d, linked=" TS " " fmt "\n", \ + STRACE("%s P%d, linked=" TS " " fmt, \ (ce)->domain->name, crit_cpu(ce)->cpu, TA((ce)->linked), ##args) /* @@ -163,14 +163,14 @@ static void update_ghost_time(struct task_struct *p) BUG_ON(!is_ghost(p)); if (unlikely ((s64)delta < 0)) { delta = 0; - TRACE_MC_TASK(p, "WARNING: negative time delta"); + TRACE_MC_TASK(p, "WARNING: negative time delta\n"); } if (tsk_mc_data(p)->mc_job.ghost_budget <= delta) { - TRACE_MC_TASK(p, "Ghost job could have ended"); + TRACE_MC_TASK(p, "Ghost job could have ended\n"); tsk_mc_data(p)->mc_job.ghost_budget = 0; p->se.exec_start = clock; } else { - TRACE_MC_TASK(p, "Ghost job updated, but didn't finish"); + TRACE_MC_TASK(p, "Ghost job updated, but didn't finish\n"); tsk_mc_data(p)->mc_job.ghost_budget -= delta; p->se.exec_start = clock; } @@ -201,7 +201,7 @@ static void link_task_to_crit(struct crit_entry *ce, { lt_t when_to_fire; - TRACE_CRIT_ENTRY(ce, "Linking " TS, TA(task)); + TRACE_CRIT_ENTRY(ce, "Linking " TS "\n", TA(task)); BUG_ON(!ce->usable && task); BUG_ON(task && tsk_rt(task)->linked_on != NO_CPU); BUG_ON(task && is_global(ce->domain) && @@ -209,7 +209,7 @@ static void link_task_to_crit(struct crit_entry *ce, /* Unlink last task */ if (ce->linked) { - TRACE_MC_TASK(ce->linked, "Unlinking"); + TRACE_MC_TASK(ce->linked, "Unlinking\n"); ce->linked->rt_param.linked_on = NO_CPU; if (is_ghost(ce->linked)) { cancel_ghost(ce); @@ -248,7 +248,7 @@ static void job_arrival(struct task_struct *task) { struct domain *dom = get_task_domain(task); - TRACE_MC_TASK(task, "Job arriving"); + TRACE_MC_TASK(task, "Job arriving\n"); BUG_ON(!task); if (can_requeue(task)) { @@ -263,7 +263,7 @@ static void job_arrival(struct task_struct *task) * causing the system to crash when the task is scheduled * in two places simultaneously. */ - TRACE_MC_TASK(task, "Delayed arrival of scheduled task"); + TRACE_MC_TASK(task, "Delayed arrival of scheduled task\n"); } } @@ -284,7 +284,7 @@ static void low_prio_arrival(struct task_struct *task) if (smp_processor_id() != interrupt_cpu) { entry = &__get_cpu_var(cpus); raw_spin_lock(&entry->redir_lock); - TRACE_MC_TASK(task, "Adding to redirect queue"); + TRACE_MC_TASK(task, "Adding to redirect queue\n"); list_add(&tsk_rt(task)->list, &entry->redir); raw_spin_unlock(&entry->redir_lock); litmus_reschedule(interrupt_cpu); @@ -314,7 +314,7 @@ static void fix_global_levels(void) list_for_each_safe(pos, safe, &e->redir) { t = list_entry(pos, struct task_struct, rt_param.list); BUG_ON(!t); - TRACE_MC_TASK(t, "Dequeued redirected job"); + TRACE_MC_TASK(t, "Dequeued redirected job\n"); list_del_init(pos); job_arrival(t); } @@ -331,7 +331,7 @@ static void fix_global_levels(void) static void link_task_to_cpu(struct cpu_entry *entry, struct task_struct *task) { int i = entry_level(entry); - TRACE_MC_TASK(task, "Linking to P%d", entry->cpu); + TRACE_MC_TASK(task, "Linking to P%d\n", entry->cpu); BUG_ON(task && tsk_rt(task)->linked_on != entry->cpu); BUG_ON(task && is_ghost(task)); @@ -341,7 +341,7 @@ static void link_task_to_cpu(struct cpu_entry *entry, struct task_struct *task) entry->linked = task; /* Higher criticality crit entries are now usable */ for (; i < entry_level(entry) + 1; i++) { - TRACE_CRIT_ENTRY(&entry->crit_entries[i], "Marking usable"); + TRACE_CRIT_ENTRY(&entry->crit_entries[i], "Marking usable\n"); entry->crit_entries[i].usable = 1; } } @@ -360,7 +360,7 @@ static void preempt(struct domain *dom, struct crit_entry *ce) struct task_struct *old = ce->linked; BUG_ON(!task); - TRACE_CRIT_ENTRY(ce, "Preempted by " TS, TA(task)); + TRACE_CRIT_ENTRY(ce, "Preempted by " TS "\n", TA(task)); /* Per-domain preemption */ if (old && can_requeue(old)) { @@ -407,7 +407,7 @@ static void update_crit_levels(struct cpu_entry *entry) * explained in job_arrival. */ readmit[i] = (!global_preempted) ? ce->linked : NULL; - TRACE_CRIT_ENTRY(ce, "Marking un-usable"); + TRACE_CRIT_ENTRY(ce, "Marking un-usable\n"); ce->usable = 0; if (ce->linked) link_task_to_crit(ce, NULL); @@ -481,7 +481,7 @@ static void remove_from_all(struct task_struct* task) struct crit_entry *ce; struct domain *dom = get_task_domain(task); - TRACE_MC_TASK(task, "Removing from everything"); + TRACE_MC_TASK(task, "Removing from everything\n"); BUG_ON(!task); raw_spin_lock(dom->lock); @@ -530,7 +530,7 @@ static void remove_from_all(struct task_struct* task) static void job_completion(struct task_struct *task, int forced) { lt_t now; - TRACE_MC_TASK(task, "Completed"); + TRACE_MC_TASK(task, "Completed\n"); sched_trace_task_completion(task, forced); BUG_ON(!task); @@ -542,7 +542,7 @@ static void job_completion(struct task_struct *task, int forced) /* If it's not a ghost job, do ghost job conversion */ if (!is_ghost(task)) { - TRACE_MC_TASK(task, "is not a ghost task"); + TRACE_MC_TASK(task, "is not a ghost task\n"); tsk_mc_data(task)->mc_job.ghost_budget = budget_remaining(task); tsk_mc_data(task)->mc_job.is_ghost = 1; } @@ -552,7 +552,7 @@ static void job_completion(struct task_struct *task, int forced) * conversion. Revert back to a normal task and complete the period. */ if (tsk_mc_data(task)->mc_job.ghost_budget == 0) { - TRACE_MC_TASK(task, "has zero ghost budget"); + TRACE_MC_TASK(task, "has zero ghost budget\n"); tsk_mc_data(task)->mc_job.is_ghost = 0; prepare_for_next_period(task); if (is_released(task, litmus_clock())) @@ -582,7 +582,7 @@ static enum hrtimer_restart mc_ghost_exhausted(struct hrtimer *timer) local_irq_save(flags); TRACE("Ghost exhausted\n"); - TRACE_CRIT_ENTRY(ce, "Firing here"); + TRACE_CRIT_ENTRY(ce, "Firing here\n"); /* Due to race conditions, we cannot just set the linked * task's budget to 0 as it may no longer be the task @@ -929,7 +929,7 @@ static struct task_struct* mc_schedule(struct task_struct * prev) if (next) { TRACE_TASK(next, "Picked this task\n"); } else if (exists && !next) - TRACE_ENTRY(entry, "Becomes idle at %llu", litmus_clock()); + TRACE_ENTRY(entry, "Becomes idle at %llu\n", litmus_clock()); return next; } diff --git a/litmus/sched_mc_ce.c b/litmus/sched_mc_ce.c index 5a19628b06df..af02dfdbb523 100644 --- a/litmus/sched_mc_ce.c +++ b/litmus/sched_mc_ce.c @@ -487,7 +487,7 @@ lt_t mc_ce_timer_callback_common(struct domain *dom) if (budget_overrun) TRACE_MC_TASK(should_schedule, "timer expected job number: %u " - "but current job: %u", + "but current job: %u\n", pid_entry->expected_job, tsk_rt(should_schedule)->job_params.job_no); } -- cgit v1.2.2