Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mc: Also remove the process_index
[simgrid.git] / src / mc / remote / Client.cpp
index d357a29..71d790d 100644 (file)
@@ -3,29 +3,17 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "src/mc/remote/Client.hpp"
+#include "src/internal_config.h"
+#include <simgrid/modelchecker.h>
+
 #include <cerrno>
 #include <cstdlib>
 #include <cstring>
-
 #include <sys/ptrace.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 
-#include <xbt/coverage.h>
-#include <xbt/log.h>
-#include <xbt/mmalloc.h>
-#include <xbt/sysdep.h>
-
-#include <simgrid/modelchecker.h>
-
-#include "src/internal_config.h"
-
-#include "src/mc/mc_request.hpp"
-#include "src/mc/remote/Client.hpp"
-#include "src/mc/remote/mc_protocol.h"
-
-#include "src/smpi/include/private.hpp"
-
 // We won't need those once the separation MCer/MCed is complete:
 #include "src/mc/mc_smx.hpp"
 
@@ -66,7 +54,7 @@ Client* Client::initialize()
     xbt_die("Unexpected socket type %i", type);
   XBT_DEBUG("Model-checked application found expected socket type");
 
-  instance_ = std::unique_ptr<Client>(new simgrid::mc::Client(fd));
+  instance_.reset(new simgrid::mc::Client(fd));
 
   // Wait for the model-checker:
   errno = 0;
@@ -113,12 +101,7 @@ void Client::handleSimcall(s_mc_message_simcall_handle_t* message)
   if (channel_.send(MC_MESSAGE_WAITING))
     xbt_die("Could not send MESSAGE_WAITING to model-checker");
 }
-void Client::handleRestore(s_mc_message_restore_t* message)
-{
-#if HAVE_SMPI
-  smpi_really_switch_data_segment(simgrid::s4u::Actor::by_pid(message->index));
-#endif
-}
+
 void Client::handleActorEnabled(s_mc_message_actor_enabled_t* msg)
 {
   bool res = simgrid::mc::actor_is_enabled(SIMIX_process_from_PID(msg->aid));
@@ -159,12 +142,6 @@ void Client::handleMessages()
         handleSimcall((s_mc_message_simcall_handle_t*)message_buffer);
         break;
 
-      case MC_MESSAGE_RESTORE:
-        xbt_assert(received_size == sizeof(s_mc_message_t), "Unexpected size for MESSAGE_RESTORE (%zd != %zu)",
-                   received_size, sizeof(s_mc_message_t));
-        handleRestore((s_mc_message_restore_t*)message_buffer);
-        break;
-
       case MC_MESSAGE_ACTOR_ENABLED:
         xbt_assert(received_size == sizeof(s_mc_message_actor_enabled_t),
                    "Unexpected size for ACTOR_ENABLED (%zd != %zu)", received_size,
@@ -185,7 +162,6 @@ void Client::mainLoop()
     simgrid::mc::wait_for_requests();
     xbt_assert(channel_.send(MC_MESSAGE_WAITING) == 0, "Could not send WAITING message to model-checker");
     this->handleMessages();
-    coverage_checkpoint();
   }
 }
 
@@ -260,12 +236,6 @@ void Client::declareStack(void* stack, size_t size, smx_actor_t process, ucontex
   region.context = context;
   region.size    = size;
   region.block   = ((char*)stack - (char*)heap->heapbase) / BLOCKSIZE + 1;
-#if HAVE_SMPI
-  if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP && process)
-    region.process_index = process->pid_ - 1;
-  else
-#endif
-    region.process_index = -1;
 
   s_mc_message_stack_region_t message;
   message.type         = MC_MESSAGE_STACK_REGION;