summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
272390a)
It's probably a pity, but I need to simplify this code to get the
grasp back.
simgrid::config::Flag<bool> _sg_mc_sparse_checkpoint{"model-check/sparse-checkpoint", "Use sparse per-page snapshots.",
false, [](bool) { _mc_cfg_cb_check("checkpointing value"); }};
simgrid::config::Flag<bool> _sg_mc_sparse_checkpoint{"model-check/sparse-checkpoint", "Use sparse per-page snapshots.",
false, [](bool) { _mc_cfg_cb_check("checkpointing value"); }};
-simgrid::config::Flag<bool> _sg_mc_ksm{"model-check/ksm", "Kernel same-page merging", false,
- [](bool) { _mc_cfg_cb_check("KSM value"); }};
-
simgrid::config::Flag<std::string> _sg_mc_property_file{
"model-check/property", "Name of the file containing the property, as formatted by the ltl2ba program.", "",
[](const std::string&) { _mc_cfg_cb_check("property"); }};
simgrid::config::Flag<std::string> _sg_mc_property_file{
"model-check/property", "Name of the file containing the property, as formatted by the ltl2ba program.", "",
[](const std::string&) { _mc_cfg_cb_check("property"); }};
extern XBT_PUBLIC simgrid::config::Flag<std::string> _sg_mc_record_path;
extern XBT_PRIVATE simgrid::config::Flag<int> _sg_mc_checkpoint;
extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_sparse_checkpoint;
extern XBT_PUBLIC simgrid::config::Flag<std::string> _sg_mc_record_path;
extern XBT_PRIVATE simgrid::config::Flag<int> _sg_mc_checkpoint;
extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_sparse_checkpoint;
-extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_ksm;
extern XBT_PUBLIC simgrid::config::Flag<std::string> _sg_mc_property_file;
extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_comms_determinism;
extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_send_determinism;
extern XBT_PUBLIC simgrid::config::Flag<std::string> _sg_mc_property_file;
extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_comms_determinism;
extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_send_determinism;
RegionSnapshot dense_region(RegionType region_type, void* start_addr, void* permanent_addr, size_t size)
{
RegionSnapshot dense_region(RegionType region_type, void* start_addr, void* permanent_addr, size_t size)
{
- // When KSM support is enables, we allocate memory using mmap:
- // * we don't want to advise bits of the heap as mergable
- // * mmap gives data aligned on page boundaries which is merge friendly
- simgrid::mc::Buffer data;
- if (_sg_mc_ksm)
- data = Buffer::mmap(size);
- else
- data = Buffer::malloc(size);
+ simgrid::mc::Buffer data = Buffer::malloc(size);
mc_model_checker->process().read_bytes(data.get(), size, remote(permanent_addr), simgrid::mc::ProcessIndexDisabled);
mc_model_checker->process().read_bytes(data.get(), size, remote(permanent_addr), simgrid::mc::ProcessIndexDisabled);
-#ifdef __linux__
- if (_sg_mc_ksm)
- // Mark the region as mergeable *after* we have written into it.
- // Trying to merge them before is useless/counterproductive.
- madvise(data.get(), size, MADV_MERGEABLE);
-#endif
-
simgrid::mc::RegionSnapshot region(region_type, start_addr, permanent_addr, size);
region.flat_data(std::move(data));
simgrid::mc::RegionSnapshot region(region_type, start_addr, permanent_addr, size);
region.flat_data(std::move(data));
mc_model_checker->process().read_bytes(&privatization_regions, sizeof(privatization_regions),
remote(remote_smpi_privatization_regions));
mc_model_checker->process().read_bytes(&privatization_regions, sizeof(privatization_regions),
remote(remote_smpi_privatization_regions));
- std::vector<simgrid::mc::RegionSnapshot> data;
+ std::vector<RegionSnapshot> data;
data.reserve(process_count);
for (size_t i = 0; i < process_count; i++)
data.reserve(process_count);
for (size_t i = 0; i < process_count; i++)
- data.push_back(simgrid::mc::region(region_type, start_addr, privatization_regions[i].address, size));
+ data.push_back(region(region_type, start_addr, privatization_regions[i].address, size));
- simgrid::mc::RegionSnapshot region = simgrid::mc::RegionSnapshot(region_type, start_addr, permanent_addr, size);
+ RegionSnapshot region = RegionSnapshot(region_type, start_addr, permanent_addr, size);
region.privatized_data(std::move(data));
return region;
}
region.privatized_data(std::move(data));
return region;
}