From: Brian Norris Date: Tue, 24 Apr 2012 03:39:01 +0000 (-0700) Subject: schedule: only print when DEBUG is enabled X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d4361e592c3a19d3a4ec24cea410118eac798b79;p=cdsspec-compiler.git schedule: only print when DEBUG is enabled --- diff --git a/model.cc b/model.cc index 85ad11a..fc0f13d 100644 --- a/model.cc +++ b/model.cc @@ -214,7 +214,7 @@ void ModelChecker::print_trace(void) scheduler->print(); - printf("\nTrace:\n\n"); + printf("Trace:\n\n"); for (it = action_trace->begin(); it != action_trace->end(); it++) { DBG(); diff --git a/schedule.cc b/schedule.cc index c9a1ce1..d6ec038 100644 --- a/schedule.cc +++ b/schedule.cc @@ -45,12 +45,12 @@ Thread * Scheduler::get_current_thread(void) void Scheduler::print() { if (current) - printf("Current thread: %d\n", current->get_id()); + DEBUG("Current thread: %d\n", current->get_id()); else - printf("No current thread\n"); - printf("Num. threads in ready list: %ld\n", readyList.size()); + DEBUG("No current thread\n"); + DEBUG("Num. threads in ready list: %ld\n", readyList.size()); std::list::iterator it; for (it = readyList.begin(); it != readyList.end(); it++) - printf("In ready list: thread %d\n", (*it)->get_id()); + DEBUG("In ready list: thread %d\n", (*it)->get_id()); }