Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
inline a function
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 30 May 2019 14:43:01 +0000 (16:43 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 30 May 2019 14:43:01 +0000 (16:43 +0200)
src/mc/sosp/ChunkedData.hpp
src/mc/sosp/RegionSnapshot.cpp
src/mc/sosp/RegionSnapshot.hpp
src/mc/sosp/mc_snapshot.cpp

index 33f71a5..4c143ea 100644 (file)
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "src/mc/mc_forward.hpp"
+#include "src/mc/remote/RemotePtr.hpp"
 #include "src/mc/sosp/PageStore.hpp"
 
 namespace simgrid {
index 4088d43..c9388e7 100644 (file)
@@ -22,19 +22,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_RegionSnaphot, mc, "Logging specific to regio
 namespace simgrid {
 namespace mc {
 
-/** @brief Take a snapshot of a given region
- *
- * @param type
- * @param start_addr   Address of the region in the simulated process
- * @param permanent_addr Permanent address of this data (for privatized variables, this is the virtual address of the
- * privatized mapping)
- * @param size         Size of the data*
- */
-RegionSnapshot* region(RegionType type, void* start_addr, void* permanent_addr, size_t size)
-{
-  return new RegionSnapshot(type, start_addr, permanent_addr, size);
-}
-
 RegionSnapshot::RegionSnapshot(RegionType region_type, void* start_addr, void* permanent_addr, size_t size)
     : region_type_(region_type), start_addr_(start_addr), size_(size), permanent_addr_(permanent_addr)
 {
index 8ceb446..b194a80 100644 (file)
@@ -17,24 +17,7 @@ namespace mc {
 
 enum class RegionType { Unknown = 0, Heap = 1, Data = 2 };
 
-/** A copy/snapshot of a given memory region
- *
- *  Different types of region snapshot storage types exist:
- *
- *  * flat/dense snapshots are a simple copy of the region;
- *
- *  * sparse/per-page snapshots are snaapshots which shared
- *    identical pages.
- *
- *  * privatized (SMPI global variable privatization).
- *
- *  This is handled with a variant based approach:
- *
- *  * `storage_type` identified the type of storage;
- *
- *  * an anonymous enum is used to distinguish the relevant types for
- *    each type.
- */
+/** A copy/snapshot of a given memory region, where identical pages are stored only once */
 class RegionSnapshot {
 public:
   static const RegionType UnknownRegion = RegionType::Unknown;
@@ -127,8 +110,6 @@ public:
   void restore();
 };
 
-RegionSnapshot* region(RegionType type, void* start_addr, void* data_addr, std::size_t size);
-
 } // namespace mc
 } // namespace simgrid
 
index fbe1a42..50275e2 100644 (file)
@@ -307,7 +307,7 @@ void Snapshot::add_region(RegionType type, ObjectInformation* object_info, void*
   else if (type == simgrid::mc::RegionType::Heap)
     xbt_assert(not object_info, "Unexpected object info for heap region.");
 
-  simgrid::mc::RegionSnapshot* region = simgrid::mc::region(type, start_addr, permanent_addr, size);
+  simgrid::mc::RegionSnapshot* region = new RegionSnapshot(type, start_addr, permanent_addr, size);
   region->object_info(object_info);
   snapshot_regions_.push_back(std::unique_ptr<simgrid::mc::RegionSnapshot>(std::move(region)));
 }