Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make mc::Api::get_actor_name return a const&.
[simgrid.git] / src / mc / remote / RemoteProcess.hpp
index 78bb6b723358235dacb44f17de3542a38b2d0165..19df38380dbf5c0ee21429bcddfa6c6039c92096 100644 (file)
@@ -27,7 +27,7 @@ public:
 
   /** Hostname (owned by `mc_model_checker->hostnames_`) */
   const xbt::string* hostname = nullptr;
-  std::string name;
+  xbt::string name;
 
   void clear()
   {
@@ -75,7 +75,7 @@ private:
 public:
   explicit RemoteProcess(pid_t pid);
   ~RemoteProcess() override;
-  void init();
+  void init(void* mmalloc_default_mdp, void* maxpid, void* actors, void* dead_actors);
 
   RemoteProcess(RemoteProcess const&) = delete;
   RemoteProcess(RemoteProcess&&)      = delete;
@@ -164,7 +164,13 @@ public:
   /* ***************** */
   /* SIMIX-related API */
   /* ***************** */
+private:
+  // Cache the address of the variables we read directly in the memory of remote
+  void* maxpid_addr_;
+  void* actors_addr_;
+  void* dead_actors_addr_;
 
+public:
   std::vector<ActorInformation>& actors();
   std::vector<ActorInformation>& dead_actors();
 
@@ -195,6 +201,7 @@ public:
   }
 
   unsigned long get_maxpid() const;
+  void get_actor_vectors(RemotePtr<s_xbt_dynar_t>& actors, RemotePtr<s_xbt_dynar_t>& dead_actors);
 
   void dump_stack() const;