X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/12a5e400dc33bddd5a5799d5481f51cfa3c58b01..026942606020b281e430912ea77340fc2a13bf5f:/src/mc/sosp/mc_snapshot.hpp diff --git a/src/mc/sosp/mc_snapshot.hpp b/src/mc/sosp/mc_snapshot.hpp index c1d09dfb28..233b19ca45 100644 --- a/src/mc/sosp/mc_snapshot.hpp +++ b/src/mc/sosp/mc_snapshot.hpp @@ -94,26 +94,31 @@ public: ~Snapshot() = default; /* Initialization */ - void add_region(RegionType type, ObjectInformation* object_info, void* start_addr, void* permanent_addr, - std::size_t size); /* Regular use */ const void* read_bytes(void* buffer, std::size_t size, RemotePtr address, int process_index = ProcessIndexAny, ReadOptions options = ReadOptions::none()) const override; RegionSnapshot* get_region(const void* addr, int process_index) const; RegionSnapshot* get_region(const void* addr, int process_index, RegionSnapshot* hinted_region) const; + void restore(RemoteClient* process); // To be private int num_state_; std::size_t heap_bytes_used_; std::vector> snapshot_regions_; std::set enabled_processes_; - int privatization_index_; + int privatization_index_ = 0; std::vector stack_sizes_; std::vector stacks_; std::vector to_ignore_; std::uint64_t hash_ = 0; std::vector ignored_data_; + +private: + void add_region(RegionType type, ObjectInformation* object_info, void* start_addr, void* permanent_addr, + std::size_t size); + void snapshot_regions(simgrid::mc::RemoteClient* process); + void snapshot_stacks(simgrid::mc::RemoteClient* process); }; } // namespace mc } // namespace simgrid @@ -124,7 +129,6 @@ namespace simgrid { namespace mc { XBT_PRIVATE std::shared_ptr take_snapshot(int num_state); -XBT_PRIVATE void restore_snapshot(std::shared_ptr snapshot); } // namespace mc } // namespace simgrid