X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/340cf8df326e4bbb67c046172f8a73eecc6a3583..e6ca184e99d50d0ee8fe405a83ee5277e2ecfce6:/src/mc/Process.hpp diff --git a/src/mc/Process.hpp b/src/mc/Process.hpp index 8de84355e3..724d068133 100644 --- a/src/mc/Process.hpp +++ b/src/mc/Process.hpp @@ -14,15 +14,12 @@ #include #include -#include - #include #include #include #include -#include #include #ifdef HAVE_MC @@ -49,18 +46,28 @@ typedef int mc_process_cache_flags_t; #define MC_PROCESS_CACHE_FLAG_MALLOC_INFO 2 #define MC_PROCESS_CACHE_FLAG_SIMIX_PROCESSES 4 -struct s_mc_smx_process_info { +namespace simgrid { +namespace mc { + +class SimixProcessInformation { +public: /** MCed address of the process */ - void* address; - /** (Flat) Copy of the process data structure */ - struct s_smx_process copy; + void* address = nullptr; + union { + /** (Flat) Copy of the process data structure */ + struct s_smx_process copy; + }; /** Hostname (owned by `mc_modelchecker->hostnames`) */ - const char* hostname; - char* name; -}; + const char* hostname = nullptr; + std::string name; -namespace simgrid { -namespace mc { + void clear() + { + name.clear(); + address = nullptr; + hostname = nullptr; + } +}; struct IgnoredRegion { std::uint64_t addr; @@ -207,7 +214,7 @@ public: void ignore_local_variable(const char *var_name, const char *frame_name); int socket() { return socket_; } - simgrid::xbt::DynarRange simix_processes(); + std::vector& simix_processes(); private: void init_memory_map_info(); @@ -239,13 +246,13 @@ public: // Copies of MCed SMX data structures * * See mc_smx.c. */ - xbt_dynar_t smx_process_infos = nullptr; + std::vector smx_process_infos; /** Copy of `simix_global->process_to_destroy` * * See mc_smx.c. */ - xbt_dynar_t smx_old_process_infos = nullptr; + std::vector smx_old_process_infos; /** State of the cache (which variables are up to date) */ mc_process_cache_flags_t cache_flags = MC_PROCESS_CACHE_FLAG_NONE;