summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbpodgursky <bpodgursky@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-10-04 19:45:46 +0000
committerbpodgursky <bpodgursky@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-10-04 19:45:46 +0000
commit28560d4a95aeccc74b4b1668ff4830d09b3a1de4 (patch)
tree0d29ee64bf2fcaea972768cd289998b749ada42a
parent100a133a74e1a82c8db3958ea2d66bb0c765a2bc (diff)
downloadATCD-28560d4a95aeccc74b4b1668ff4830d09b3a1de4.tar.gz
Sun Oct 4 19:44:35 UTC 2009 Ben Podgursky <bpodgursky@gmail.com>
-rw-r--r--ChangeLog10
-rw-r--r--SA_POP_Types.h4
-rw-r--r--SA_SchedStrategy.cpp32
-rw-r--r--SA_WorkingPlan.cpp38
4 files changed, 46 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog
index fc4b0628af1..764d7417046 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Oct 4 19:44:35 UTC 2009 Ben Podgursky <bpodgursky@gmail.com>
+
+ * SA_POP_Types.h:
+ * SA_SchedStrategy.cpp:
+ * SA_WorkingPlan.cpp:
+
+ Changed debug levels
+
Fri Oct 2 23:31:27 UTC 2009 Ben Podgursky <bpodgursky@gmail.com>
* SANet/SANet.cpp:
@@ -8,7 +16,7 @@ Fri Oct 2 23:31:27 UTC 2009 Ben Podgursky <bpodgursky@gmail.com>
* SA_WorkingPlan.cpp:
* TaskMapFileIn.cpp:
- Init task renumbered
+ Init task renumbered
Thu Oct 1 21:33:24 UTC 2009 unknown <unknown@vanderbilt.edu>
diff --git a/SA_POP_Types.h b/SA_POP_Types.h
index c74cd776466..9d82845763e 100644
--- a/SA_POP_Types.h
+++ b/SA_POP_Types.h
@@ -30,9 +30,9 @@
#endif /* SA_POP_HAS_ACE */
#define MAX_TASK_INSTS 8
-#define ANKET 1
+#define SA_POP_DEBUG_VERBOSE 1
#define SA_POP_DEBUG_NORMAL 5
-#define SPARTAN 9
+#define SA_POP_DEBUG_LOW 9
#define SA_POP_DEBUG_HIGH 10
#define _CRTDBG_MAP_ALLOC
#if defined (SA_POP_HAS_ACE)
diff --git a/SA_SchedStrategy.cpp b/SA_SchedStrategy.cpp
index 065e9098cea..6000ab3845e 100644
--- a/SA_SchedStrategy.cpp
+++ b/SA_SchedStrategy.cpp
@@ -338,7 +338,7 @@ void SA_SchedStrategy::calculate_levels(TaskInstID task_inst)
}
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
LevelMap temp;
@@ -441,7 +441,7 @@ bool SA_SchedStrategy::search(double min_crit)
std::ostringstream debug_text;
debug_text<<"Criticality of "<<*iter<<" consumer: "<<crit_cons.second<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
@@ -498,7 +498,7 @@ bool SA_SchedStrategy::prec_balance_prop (TaskInstID task_inst)
std::ostringstream debug_text;
debug_text<<"Doing Precedence balance prop for "<<task_inst<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
CommandID cur_cmd_id = this->planner_->cur_command_id();
@@ -518,7 +518,7 @@ bool SA_SchedStrategy::prec_balance_prop (TaskInstID task_inst)
if(temp_start.second!=NULL_TIME && temp_start.second<start_win.first)
{
debug_text<<"The consumer of "<<*iter<<" has to executed before"<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
if(temp_end.first!=NULL_TIME && (start_win.second==NULL_TIME || temp_end.first<start_win.second)) producers_unranked.insert(*iter);
@@ -566,7 +566,7 @@ bool SA_SchedStrategy::time_balance_prop (TaskInstID task_inst)
std::ostringstream debug_text;
debug_text<<"Doing time balance prop for "<<task_inst<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
CommandID cur_cmd_id = this->planner_->cur_command_id();
@@ -589,7 +589,7 @@ bool SA_SchedStrategy::time_balance_prop (TaskInstID task_inst)
{
debug_text<<"THe consumer of "<<*iter<<" has to execute before"<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
//The consumer has to be executed before this task instance
@@ -601,7 +601,7 @@ bool SA_SchedStrategy::time_balance_prop (TaskInstID task_inst)
{
// This task instance can be pushed before the task instance
debug_text<<"Task inst "<<*iter<<" can cause trouble"<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
@@ -628,14 +628,14 @@ bool SA_SchedStrategy::time_balance_prop (TaskInstID task_inst)
debug_text<<*iter2<<" ";
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
if(level_before<0)
{
debug_text<<"The level_before is negative"<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
ResourceValue level_prod=0;
@@ -651,7 +651,7 @@ bool SA_SchedStrategy::time_balance_prop (TaskInstID task_inst)
TimeWindow temp2_end = this->planner_->get_end_window(*iter2);
debug_text<<"greater than "<<*iter2<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
if(temp2_end.first>start_win.first)
@@ -677,7 +677,7 @@ bool SA_SchedStrategy::time_balance_prop (TaskInstID task_inst)
for(TaskInstSet::const_iterator iter=simul->begin();iter!=simul->end();iter++)
{
debug_text<<"calculating for "<<*iter<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
ResourceMap temp_rm = this->planner_->get_all_resources(this->planner_->get_task_impl_from_inst(*iter));
@@ -691,7 +691,7 @@ bool SA_SchedStrategy::time_balance_prop (TaskInstID task_inst)
for(TaskInstSet::const_iterator iter=unranked->begin();iter!=unranked->end();iter++)
{
debug_text<<"checking out "<<*iter<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
TimeWindow temp_start = this->planner_->get_start_window(*iter);
@@ -760,7 +760,7 @@ bool SA_SchedStrategy::energy_prop (TaskInstID task_inst)
std::ostringstream debug_text;
debug_text<<"Doing energy precedence calculations for "<<task_inst<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
CommandID cur_cmd_id = this->planner_->cur_command_id();
@@ -816,7 +816,7 @@ bool SA_SchedStrategy::energy_prop (TaskInstID task_inst)
}
debug_text<<"After calculations for resource "<<rm_iter->first<<" start_min="<<min_start<<" and end_max="<<max_end<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
}
@@ -919,7 +919,7 @@ bool SA_SchedStrategy::energy_prop_after (TaskInstID task_inst)
}
debug_text<<"After after calculations for resource "<<rm_iter->first<<" start_min="<<min_start<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
}
if(min_start!=start_win.first)
@@ -1005,7 +1005,7 @@ bool SA_SchedStrategy::energy_prop_before (TaskInstID task_inst)
}
debug_text<<"After before calculations for resource "<<rm_iter->first<<" and end_max="<<max_end<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
}
if(max_end!=end_win.second)
diff --git a/SA_WorkingPlan.cpp b/SA_WorkingPlan.cpp
index 8364de87682..8fa2d3e3cc6 100644
--- a/SA_WorkingPlan.cpp
+++ b/SA_WorkingPlan.cpp
@@ -347,7 +347,7 @@ void SA_WorkingPlan::generate_all_threats(void)
debug_text <<" Task (" <<threat_possibility_taskid << ")"<< ": Inst (" <<iterator->first << ")" << std::endl;
}
debug_text<<std::endl;
- SA_POP_DEBUG_STR (SPARTAN, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_LOW, debug_text.str ());
debug_text.str("");
debug_text << "SA_WorkingPlan::generate_all_threats: All Causal Threats: " << std::endl;
@@ -1134,7 +1134,7 @@ bool SA_WorkingPlan::execute (SA_ResolveSchedOrderCmd *cmd)
debug_text<<"Scheduling "<<cmd->first<<" before "<<cmd->second<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
TaskInstID first_task_inst = cmd->first;
@@ -1239,7 +1239,7 @@ bool SA_WorkingPlan::execute (SA_AdjustMinTimesCmd *cmd)
{
std::ostringstream debug_text;
debug_text<<"adjusting min time for "<<cmd->task_inst_<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
TimeWindow *start_win = &this->start_window_map_.find(cmd->task_inst_)->second;
@@ -1282,7 +1282,7 @@ bool SA_WorkingPlan::execute (SA_AdjustMinTimesCmd *cmd)
if(sched.empty()) debug_text<<"sched is empty"<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
for(TaskInstSet::iterator iter=sched.begin();iter!=sched.end();iter++)
@@ -1316,7 +1316,7 @@ bool SA_WorkingPlan::execute (SA_AdjustMinTimesCmd *cmd)
}
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
for(SA_AdjustMinTimesCmd::MinTimesAdjustList::iterator iter=cmd->min_adjust_cmds.begin();iter!=cmd->min_adjust_cmds.end();iter++)
@@ -1344,7 +1344,7 @@ bool SA_WorkingPlan::execute (SA_AdjustMinTimesCmd *cmd)
}
debug_text<<"min times of "<<cmd->task_inst_<<" : "<<cmd->new_start_min<<" "<<cmd->new_end_min<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
return true;
@@ -1448,7 +1448,7 @@ bool SA_WorkingPlan::execute (SA_AdjustMaxTimesCmd *cmd)
}
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
@@ -1474,7 +1474,7 @@ bool SA_WorkingPlan::execute (SA_AdjustMaxTimesCmd *cmd)
unranked->erase(unranked->find(*iter));
}
debug_text<<"max times for "<<cmd->task_inst_<<" : "<<cmd->new_start_max<<" "<<cmd->new_end_max<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
return true;
@@ -1486,7 +1486,7 @@ void SA_WorkingPlan::undo (SA_AdjustMaxTimesCmd *cmd)
{
std::ostringstream debug_text;
debug_text<<"task inst is "<<cmd->task_inst_<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
TimeWindow *start_win = &this->get_start_window(cmd->task_inst_);
@@ -1577,7 +1577,7 @@ void SA_WorkingPlan::add_sched_link(TaskInstID first_task_inst, TaskInstID secon
{
std::ostringstream debug_text;
debug_text<<"Adding sched link insert"<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
this->sched_links_.insert(std::make_pair(first_task_inst,second_task_inst));
@@ -1624,7 +1624,7 @@ bool SA_WorkingPlan::init_prec_insert(TaskInstID task_inst, SA_AssocTaskImplCmd
std::ostringstream debug_text;
debug_text<<"for "<<task_inst<<win_start.first<<" "<<win_start.second<<" "<<win_end.first<<" "<<win_end.second<<std::endl;
debug_text<<"for "<<task_inst<<start_win.first<<" "<<start_win.second<<" "<<end_win.first<<" "<<end_win.second<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
if(win_start.first!=NULL_TIME)
@@ -1679,7 +1679,7 @@ bool SA_WorkingPlan::init_prec_insert(TaskInstID task_inst, SA_AssocTaskImplCmd
std::ostringstream debug_text;
debug_text<<"for "<<task_inst<<" "<<start_win.first<<" "<<start_win.second<<" "<<end_win.first<<" "<<end_win.second<<std::endl;
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
@@ -1711,7 +1711,7 @@ bool SA_WorkingPlan::init_prec_insert(TaskInstID task_inst, SA_AssocTaskImplCmd
}
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
if(unranked->empty()) return true;
@@ -1782,7 +1782,7 @@ bool SA_WorkingPlan::init_prec_insert(TaskInstID task_inst, SA_AssocTaskImplCmd
if(iter2_unranked->find(*iter)!=iter2_unranked->end()) iter2_unranked->erase(iter2_unranked->find(*iter));
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
}
@@ -1838,7 +1838,7 @@ bool SA_WorkingPlan::init_prec_insert(TaskInstID task_inst, SA_AssocTaskImplCmd
if(iter_unranked->find(*iter2)!=iter_unranked->end()) iter_unranked->erase(*iter2);
if(iter2_unranked->find(*iter)!=iter2_unranked->end()) iter2_unranked->erase(iter2_unranked->find(*iter));
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
}
@@ -1897,7 +1897,7 @@ bool SA_WorkingPlan::init_prec_insert(TaskInstID task_inst, SA_AssocTaskImplCmd
if(iter2_unranked->find(*iter1)!=iter2_unranked->end()) iter2_unranked->erase(iter2_unranked->find(*iter1));
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
if(iter_simul->find(*iter2)!=iter_simul->end()) continue;
@@ -1936,7 +1936,7 @@ bool SA_WorkingPlan::init_prec_insert(TaskInstID task_inst, SA_AssocTaskImplCmd
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
this->print_prec();
@@ -1976,7 +1976,7 @@ void SA_WorkingPlan::print_prec()
}
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
};
@@ -2022,7 +2022,7 @@ void SA_WorkingPlan::prec_erase(TaskInstID task_inst, SA_AssocTaskImplCmd *cmd)
iter1->second.erase(task_inst);
}
- SA_POP_DEBUG_STR (ANKET, debug_text.str ());
+ SA_POP_DEBUG_STR (SA_POP_DEBUG_VERBOSE, debug_text.str ());
debug_text.str("");
};