Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove older mpich test suite
[simgrid.git] / src / mc / mc_global.c
index 9805ce2..7469068 100644 (file)
@@ -120,7 +120,7 @@ extern xbt_dynar_t mc_heap_comparison_ignore;
 extern xbt_dynar_t stacks_areas;
 
 FILE *dot_output = NULL;
-const char* colors[10];
+const char* colors[13];
 
 xbt_automaton_t _mc_property_automaton = NULL;
 
@@ -222,17 +222,22 @@ void MC_init(){
 
 }
 
-void MC_init_dot_output(){
+void MC_init_dot_output(){ /* FIXME : more colors */
 
   colors[0] = "blue";
   colors[1] = "red";
-  colors[2] = "green";
-  colors[3] = "pink";
+  colors[2] = "green3";
+  colors[3] = "goldenrod";
   colors[4] = "brown";
   colors[5] = "purple";
-  colors[6] = "yellow";
-  colors[7] = "orange";
-  
+  colors[6] = "magenta";
+  colors[7] = "turquoise4";
+  colors[8] = "gray25";
+  colors[9] = "forestgreen";
+  colors[10] = "hotpink";
+  colors[11] = "lightblue";
+  colors[12] = "tan";
+
   dot_output = fopen(_sg_mc_dot_output_file, "w");
   
   if(dot_output == NULL){
@@ -654,6 +659,11 @@ void MC_dump_stack_safety(xbt_fifo_t stack)
 
 void MC_show_stack_safety(xbt_fifo_t stack)
 {
+
+  int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
+
+  MC_SET_RAW_MEM;
+
   int value;
   mc_state_t state;
   xbt_fifo_item_t item;
@@ -670,6 +680,9 @@ void MC_show_stack_safety(xbt_fifo_t stack)
       xbt_free(req_str);
     }
   }
+
+  if(!raw_mem_set)
+    MC_UNSET_RAW_MEM;
 }
 
 void MC_show_deadlock(smx_simcall_t req)
@@ -684,6 +697,7 @@ void MC_show_deadlock(smx_simcall_t req)
     xbt_free(req_str);*/
   XBT_INFO("Counter-example execution trace:");
   MC_dump_stack_safety(mc_stack_safety);
+  MC_print_statistics(mc_stats);
 }