Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Move the MCer wait_for_requests logic outside of MC_wait_for_requests
[simgrid.git] / src / mc / mc_global.cpp
index 68675a9..62bb75d 100644 (file)
@@ -28,7 +28,6 @@
 #include "mc_record.h"
 
 #ifdef HAVE_MC
-#include "mc_server.h"
 #include <libunwind.h>
 #include <xbt/mmalloc.h>
 #include "../xbt/mmalloc/mmprivate.h"
@@ -80,7 +79,7 @@ const char *colors[13];
 /*******************************  Initialisation of MC *******************************/
 /*********************************************************************************/
 
-static void MC_init_dot_output()
+void MC_init_dot_output()
 {                               /* FIXME : more colors */
 
   colors[0] = "blue";
@@ -127,46 +126,6 @@ void MC_init()
   }
 }
 
-void MC_init_model_checker(pid_t pid, int socket)
-{
-  mc_model_checker = new simgrid::mc::ModelChecker(pid, socket);
-
-  mc_comp_times = xbt_new0(s_mc_comparison_times_t, 1);
-
-  /* Initialize statistics */
-  mc_stats = xbt_new0(s_mc_stats_t, 1);
-  mc_stats->state_size = 1;
-
-  if ((_sg_mc_dot_output_file != NULL) && (_sg_mc_dot_output_file[0] != '\0'))
-    MC_init_dot_output();
-
-  /* Init parmap */
-  //parmap = xbt_parmap_mc_new(xbt_os_get_numcores(), XBT_PARMAP_DEFAULT);
-
-  /* Ignore some variables from xbt/ex.h used by exception e for stacks comparison */
-  MC_ignore_local_variable("e", "*");
-  MC_ignore_local_variable("__ex_cleanup", "*");
-  MC_ignore_local_variable("__ex_mctx_en", "*");
-  MC_ignore_local_variable("__ex_mctx_me", "*");
-  MC_ignore_local_variable("__xbt_ex_ctx_ptr", "*");
-  MC_ignore_local_variable("_log_ev", "*");
-  MC_ignore_local_variable("_throw_ctx", "*");
-  MC_ignore_local_variable("ctx", "*");
-
-  MC_ignore_local_variable("self", "simcall_BODY_mc_snapshot");
-  MC_ignore_local_variable("next_cont"
-    "ext", "smx_ctx_sysv_suspend_serial");
-  MC_ignore_local_variable("i", "smx_ctx_sysv_suspend_serial");
-
-  /* Ignore local variable about time used for tracing */
-  MC_ignore_local_variable("start_time", "*");
-
-  /* Static variable used for tracing */
-  MCer_ignore_global_variable("counter");
-
-  /* SIMIX */
-  MCer_ignore_global_variable("smx_total_comms");
-}
 #endif
 
 /*******************************  Core of MC *******************************/
@@ -304,7 +263,7 @@ void MC_replay(xbt_fifo_t stack)
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
         MC_handle_comm_pattern(call, req, value, NULL, 1);
 
-      MC_wait_for_requests();
+      mc_model_checker->wait_for_requests();
 
       count++;
     }
@@ -371,7 +330,7 @@ void MC_replay_liveness(xbt_fifo_t stack)
         }
 
         MC_simcall_handle(req, value);
-        MC_wait_for_requests();
+        mc_model_checker->wait_for_requests();
       }
 
       /* Update statistics */