Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove MC_init()
[simgrid.git] / src / mc / mc_global.cpp
index dbd4677..41e7877 100644 (file)
@@ -93,33 +93,17 @@ void MC_init_dot_output()
 
 }
 
-#if HAVE_MC
-void MC_init()
-{
-  simgrid::mc::processes_time.resize(simix_process_maxpid);
-
-  if (_sg_mc_visited > 0 || _sg_mc_liveness  || _sg_mc_termination || mc_mode == MC_MODE_SERVER) {
-    /* Those requests are handled on the client side and propagated by message
-     * to the server: */
-
-    MC_ignore_heap(simgrid::mc::processes_time.data(),
-      simix_process_maxpid * sizeof(double));
-
-    smx_process_t process;
-    xbt_swag_foreach(process, simix_global->process_list)
-      MC_ignore_heap(&(process->process_hookup), sizeof(process->process_hookup));
-  }
-}
-
-#endif
-
 /*******************************  Core of MC *******************************/
 /**************************************************************************/
 
 void MC_run()
 {
-  mc_mode = MC_MODE_CLIENT;
-  MC_init();
+  simgrid::mc::processes_time.resize(simix_process_maxpid);
+  MC_ignore_heap(simgrid::mc::processes_time.data(),
+    simgrid::mc::processes_time.size() * sizeof(simgrid::mc::processes_time[0]));
+  smx_process_t process;
+  xbt_swag_foreach(process, simix_global->process_list)
+    MC_ignore_heap(&(process->process_hookup), sizeof(process->process_hookup));
   simgrid::mc::Client::get()->mainLoop();
 }
 
@@ -283,39 +267,6 @@ void MC_show_non_termination(void){
   MC_print_statistics(mc_stats);
 }
 
-namespace simgrid {
-namespace mc {
-
-void show_stack_liveness(xbt_fifo_t stack)
-{
-  int value;
-  simgrid::mc::Pair* pair;
-  xbt_fifo_item_t item;
-  smx_simcall_t req;
-  char *req_str = nullptr;
-
-  for (item = xbt_fifo_get_last_item(stack);
-       item; item = xbt_fifo_get_prev_item(item)) {
-    pair = (simgrid::mc::Pair*) xbt_fifo_get_item_content(item);
-    req = MC_state_get_executed_request(pair->graph_state, &value);
-    if (req && req->call != SIMCALL_NONE) {
-      req_str = simgrid::mc::request_to_string(req, value, simgrid::mc::RequestType::executed);
-      XBT_INFO("%s", req_str);
-      xbt_free(req_str);
-    }
-  }
-}
-
-void dump_stack_liveness(xbt_fifo_t stack)
-{
-  simgrid::mc::Pair* pair;
-  while ((pair = (simgrid::mc::Pair*) xbt_fifo_pop(stack)) != nullptr)
-    delete pair;
-}
-
-}
-}
-
 void MC_print_statistics(mc_stats_t stats)
 {
   if(_sg_mc_comms_determinism) {