case simgrid::mc::StorageType::Privatized:
for (auto& p : region->privatized_data())
- restore(&p);
+ restore(p.get());
break;
default: // includes StorageType::NoData
}
}
-#if HAVE_SMPI
-RegionSnapshot privatized_region(RegionType region_type, void* start_addr, void* permanent_addr, std::size_t size)
-{
- size_t process_count = MC_smpi_process_count();
-
- // Read smpi_privatization_regions from MCed:
- smpi_privatization_region_t remote_smpi_privatization_regions;
- mc_model_checker->process().read_variable("smpi_privatization_regions", &remote_smpi_privatization_regions,
- sizeof(remote_smpi_privatization_regions));
- s_smpi_privatization_region_t privatization_regions[process_count];
- mc_model_checker->process().read_bytes(&privatization_regions, sizeof(privatization_regions),
- remote(remote_smpi_privatization_regions));
-
- std::vector<RegionSnapshot> data;
- data.reserve(process_count);
- for (size_t i = 0; i < process_count; i++)
- data.push_back(region(region_type, start_addr, privatization_regions[i].address, size));
-
- RegionSnapshot region = RegionSnapshot(region_type, start_addr, permanent_addr, size);
- region.privatized_data(std::move(data));
- return region;
-}
-#endif
-
static void get_memory_regions(simgrid::mc::RemoteClient* process, simgrid::mc::Snapshot* snapshot)
{
snapshot->snapshot_regions_.clear();
snapshot->add_region(simgrid::mc::RegionType::Heap, nullptr, start_heap, start_heap,
(char*)end_heap - (char*)start_heap);
snapshot->heap_bytes_used_ = mmalloc_get_bytes_used_remote(heap->heaplimit, process->get_malloc_info());
+ snapshot->privatization_index_ = simgrid::mc::ProcessIndexMissing;
#if HAVE_SMPI
if (mc_model_checker->process().privatized() && MC_smpi_process_count())
// snapshot->privatization_index = smpi_loaded_page
mc_model_checker->process().read_variable("smpi_loaded_page", &snapshot->privatization_index_,
sizeof(snapshot->privatization_index_));
- else
#endif
- snapshot->privatization_index_ = simgrid::mc::ProcessIndexMissing;
}
/** @brief Fills the position of the segments (executable, read-only, read/write).