From 7fdb4dbbbca577efbeec47cd1364eb319346a0cc Mon Sep 17 00:00:00 2001 From: Gary Bressler Date: Sat, 20 Mar 2010 16:46:39 -0400 Subject: More minor cleanup --- unit_trace/viz/schedule.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/unit_trace/viz/schedule.py b/unit_trace/viz/schedule.py index 5efee7d..f134562 100644 --- a/unit_trace/viz/schedule.py +++ b/unit_trace/viz/schedule.py @@ -180,7 +180,6 @@ class Schedule(object): for event_time in sorted(job.get_events().keys()): # could have multiple events at the same time (unlikely but possible) for event in job.get_events()[event_time]: - print 'task, job, event:', task.name, job.job_no, event.__class__.__name__ event.scan(cur_cpu, switches) # What if one of the initial "span events" (switch to or inversion starting) never got a @@ -366,7 +365,7 @@ class SuspendEvent(Event): def scan(self, cur_cpu, switches): if self.get_cpu() != cur_cpu[0]: self.erroneous = True - print "suspending on a CPU different from the CPU we are on!" + #fprint "suspending on a CPU different from the CPU we are on!" super(SuspendEvent, self).scan(cur_cpu, switches) def render(self, graph, layer, prev_events, selectable=False): @@ -391,7 +390,7 @@ class ResumeEvent(Event): def scan(self, cur_cpu, switches): if cur_cpu[0] != Event.NO_CPU and cur_cpu[0] != self.get_cpu(): self.erroneous = True - print "Resuming when currently scheduled on a CPU, but on a different CPU from the current CPU!" + #print "Resuming when currently scheduled on a CPU, but on a different CPU from the current CPU!" super(ResumeEvent, self).scan(cur_cpu, switches) def render(self, graph, layer, prev_events, selectable=False): @@ -448,7 +447,7 @@ class SwitchToEvent(Event): if old_cur_cpu != Event.NO_CPU: self.erroneous = True - print "currently scheduled somewhere, can't switch to a CPU" + #print "currently scheduled somewhere, can't switch to a CPU" super(SwitchToEvent, self).scan(cur_cpu, switches) @@ -498,13 +497,13 @@ class SwitchAwayEvent(Event): if self.get_cpu() != old_cur_cpu: self.erroneous = True - print "switching away from a CPU different from the CPU we are currently on" + #print "switching away from a CPU different from the CPU we are currently on" if self.corresp_start_event is None: self.erroneous = True - print "switch away was not matched by a corresponding switch to" + #print "switch away was not matched by a corresponding switch to" elif self.get_time() < self.corresp_start_event.get_time(): self.erroneous = True - print "switching away from a processor before we switched to it?!" + #print "switching away from a processor before we switched to it?!" super(SwitchAwayEvent, self).scan(cur_cpu, switches) @@ -582,7 +581,7 @@ class InversionStartEvent(ErrorEvent): def __str__(self): if self.corresp_end_event is None: - print 'Inversion Start (w/o Inversion End)' + self._common_str() \ + return 'Inversion Start (w/o Inversion End)' + self._common_str() \ + ', TIME=' + util.format_float(self.get_time(), Event.NUM_DEC_PLACES) return 'Priority Inversion' + self._common_str() + ', START=' \ + util.format_float(self.get_time(), Event.NUM_DEC_PLACES) \ @@ -626,7 +625,7 @@ class InversionEndEvent(ErrorEvent): def __str__(self): if self.corresp_start_event is None: - print 'Inversion End (w/o Inversion Start)' + self._common_str() \ + return 'Inversion End (w/o Inversion Start)' + self._common_str() \ + ', TIME=' + util.format_float(self.get_time(), Event.NUM_DEC_PLACES) return str(self.corresp_start_event) -- cgit v1.2.2