Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] RegionSnapshot, make all fields private
[simgrid.git] / src / mc / mc_compare.cpp
index a5a0bc7..73b4b34 100644 (file)
@@ -268,9 +268,9 @@ static int compare_global_variables(mc_object_info_t object_info,
   xbt_assert(r1 && r2, "Missing region.");
 
 #ifdef HAVE_SMPI
-  if (r1->storage_type == MC_REGION_STORAGE_TYPE_PRIVATIZED) {
+  if (r1->storage_type() == MC_REGION_STORAGE_TYPE_PRIVATIZED) {
     xbt_assert(process_index >= 0);
-    if (r2->storage_type != MC_REGION_STORAGE_TYPE_PRIVATIZED) {
+    if (r2->storage_type() != MC_REGION_STORAGE_TYPE_PRIVATIZED) {
       return 1;
     }
 
@@ -289,9 +289,9 @@ static int compare_global_variables(mc_object_info_t object_info,
     return 0;
   }
 #else
-  xbt_assert(r1->storage_type != MC_REGION_STORAGE_TYPE_PRIVATIZED);
+  xbt_assert(r1->storage_type() != MC_REGION_STORAGE_TYPE_PRIVATIZED);
 #endif
-  xbt_assert(r2->storage_type != MC_REGION_STORAGE_TYPE_PRIVATIZED);
+  xbt_assert(r2->storage_type() != MC_REGION_STORAGE_TYPE_PRIVATIZED);
 
   struct mc_compare_state state;
 
@@ -589,15 +589,14 @@ int snapshot_compare(void *state1, void *state2)
     mc_mem_region_t region2 = s2->snapshot_regions[k];
 
     // Preconditions:
-    if (region1->region_type != MC_REGION_TYPE_DATA)
+    if (region1->region_type() != MC_REGION_TYPE_DATA)
       continue;
 
-    xbt_assert(region1->region_type == region2->region_type);
-    xbt_assert(region1->object_info == region2->object_info);
+    xbt_assert(region1->region_type() == region2->region_type());
+    xbt_assert(region1->object_info() == region2->object_info());
+    xbt_assert(region1->object_info());
 
-    xbt_assert(region1->object_info);
-
-    const char* name = region1->object_info->file_name;
+    const char* name = region1->object_info()->file_name;
 
 #ifdef MC_DEBUG
     if (is_diff == 0)
@@ -607,7 +606,7 @@ int snapshot_compare(void *state1, void *state2)
 
     /* Compare global variables */
     is_diff =
-      compare_global_variables(region1->object_info, simgrid::mc::AddressSpace::Normal,
+      compare_global_variables(region1->object_info(  ), simgrid::mc::AddressSpace::Normal,
         region1, region2,
         s1, s2);