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).
static void fill_local_variables_values(mc_stack_frame_t stack_frame, simgrid::mc::Frame* scope, int process_index,
std::vector<s_local_variable_t>& result)
{
- simgrid::mc::RemoteClient* process = &mc_model_checker->process();
-
if (not scope || not scope->range.contain(stack_frame->ip))
return;
if (not valid_variable(¤t_variable, scope, (void*)stack_frame->ip))
continue;
- int region_type;
- // FIXME, get rid of `region_type`
- if ((long)stack_frame->ip > (long)process->libsimgrid_info->start_exec)
- region_type = 1;
- else
- region_type = 2;
-
s_local_variable_t new_var;
new_var.subprogram = stack_frame->frame;
new_var.ip = stack_frame->ip;
new_var.name = current_variable.name;
new_var.type = current_variable.type;
- new_var.region = region_type;
new_var.address = nullptr;
if (current_variable.address != nullptr)