namespace simgrid {
namespace mc {
+/** Pointer to a remote address-space (process, snapshot)
+ *
+ * With this we can clearly identify the expected type of an address in the
+ * remote process whild avoiding to use native local pointers.
+ */
+template<class T> class remote_ptr {
+ std::uint64_t address_;
+public:
+ remote_ptr() : address_(nullptr) {}
+ remote_ptr(std::uint64_t address) : address_(address) {}
+ remote_ptr(T* address) : address_((std::uint64_t)address) {}
+ std::uint64_t address() const { return address_; }
+ operator bool() const
+ {
+ return address_;
+ }
+ operator remote_ptr<void>() const
+ {
+ return remote_ptr<void>(address_);
+ }
+ remote_ptr<T> operator+(std::uint64_t n) const
+ {
+ return remote_ptr<T>(address_ + n * sizeof(T));
+ }
+ remote_ptr<T> operator-(std::uint64_t n) const
+ {
+ return remote_ptr<T>(address_ - n * sizeof(T));
+ }
+ remote_ptr<T>& operator+=(std::uint64_t n) const
+ {
+ address_ += n * sizeof(T);
+ return *this;
+ }
+ remote_ptr<T>& operator-=(std::uint64_t n) const
+ {
+ address_ -= n * sizeof(T);
+ return *this;
+ }
+};
+
+template<class T> inline
+remote_ptr<T> remote(T *p)
+{
+ return remote_ptr<T>(p);
+}
+
+template<class T=void> inline
+remote_ptr<T> remote(uint64_t p)
+{
+ return remote_ptr<T>(p);
+}
+
/** Process index used when no process is available
*
* The expected behaviour is that if a process index is needed it will fail.
};
virtual ~AddressSpace();
virtual const void* read_bytes(void* buffer, std::size_t size,
- std::uint64_t address, int process_index = ProcessIndexAny,
+ remote_ptr<void> address, int process_index = ProcessIndexAny,
ReadMode mode = Normal) = 0;
- template<class T>
- T read(uint64_t address, int process_index = ProcessIndexMissing)
+
+ template<class T> inline
+ void read(T *buffer, remote_ptr<T> ptr, int process_index = ProcessIndexAny)
+ {
+ this->read_bytes(buffer, sizeof(T), ptr, process_index);
+ }
+
+ template<class T> inline
+ T read(remote_ptr<T> ptr, int process_index = ProcessIndexMissing)
{
static_assert(std::is_trivial<T>::value, "Cannot read a non-trivial type");
T res;
- return *(T*)this->read_bytes(&res, sizeof(T), address, process_index);
+ return *(T*)this->read_bytes(&res, sizeof(T), ptr, process_index);
}
};
#include "mc_server.h"
#endif
+using simgrid::mc::remote;
+
extern "C" {
XBT_LOG_NEW_CATEGORY(mc, "All MC categories");
#ifdef HAVE_MC
// Fetch from MCed memory:
if (mc_mode == MC_MODE_SERVER) {
- mc_model_checker->process().read_bytes(
- &temp_synchro, sizeof(temp_synchro), (std::uint64_t)act);
+ mc_model_checker->process().read(&temp_synchro, remote(act));
act = &temp_synchro;
}
#endif
size_t buffer_size = 0;
if (mc_mode == MC_MODE_SERVER) {
// Read dynar:
- mc_model_checker->process().read_bytes(
- &comms_buffer, sizeof(comms_buffer),
- (std::uint64_t)simcall_comm_waitany__get__comms(req));
+ mc_model_checker->process().read(
+ &comms_buffer, remote(simcall_comm_waitany__get__comms(req)));
assert(comms_buffer.elmsize == sizeof(act));
buffer_size = comms_buffer.elmsize * comms_buffer.used;
comms = &comms_buffer;
char buffer[buffer_size];
if (mc_mode == MC_MODE_SERVER)
mc_model_checker->process().read_bytes(buffer, sizeof(buffer),
- (std::uint64_t)comms->data);
+ remote(comms->data));
#else
comms = simcall_comm_waitany__get__comms(req);
#endif
// Fetch act from MCed memory:
if (mc_mode == MC_MODE_SERVER) {
memcpy(&act, buffer + comms->elmsize * index, sizeof(act));
- mc_model_checker->process().read_bytes(
- &temp_synchro, sizeof(temp_synchro), (std::uint64_t)act);
+ mc_model_checker->process().read(&temp_synchro, remote(act));
act = &temp_synchro;
}
else
#ifdef HAVE_MC
s_smx_mutex_t temp_mutex;
if (mc_mode == MC_MODE_SERVER) {
- mc_model_checker->process().read_bytes(
- &temp_mutex, sizeof(temp_mutex), (std::uint64_t)mutex);
+ mc_model_checker->process().read(&temp_mutex, remote(mutex));
mutex = &temp_mutex;
}
#endif
#include "mc_protocol.h"
#include "mc_smx.h"
+using simgrid::mc::remote;
+
extern "C" {
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkpoint, mc,
region->size = size;
region->flat.data = xbt_malloc(size);
mc_model_checker->process().read_bytes(region->flat.data, size,
- (std::uint64_t)permanent_addr,
+ remote(permanent_addr),
simgrid::mc::ProcessIndexDisabled);
XBT_DEBUG("New region : type : %d, data : %p (real addr %p), size : %zu",
region_type, region->flat.data, permanent_addr, size);
s_smpi_privatisation_region_t privatisation_regions[process_count];
mc_model_checker->process().read_bytes(
&privatisation_regions, sizeof(privatisation_regions),
- (std::uint64_t)remote_smpi_privatisation_regions);
+ remote(remote_smpi_privatisation_regions));
for (size_t i = 0; i < process_count; i++) {
region->privatized.regions[i] =
object_info->end_rw - object_info->start_rw);
}
- xbt_mheap_t heap = MC_process_get_heap(process);
+ xbt_mheap_t heap = process->get_heap();
void *start_heap = heap->base;
void *end_heap = heap->breakval;
(char *) end_heap - (char *) start_heap);
snapshot->heap_bytes_used = mmalloc_get_bytes_used_remote(
heap->heaplimit,
- MC_process_get_malloc_info(process));
+ process->get_malloc_info());
#ifdef HAVE_SMPI
if (smpi_privatize_global_variables && MC_smpi_process_count()) {
// Read the context from remote process:
unw_context_t context;
mc_model_checker->process().read_bytes(
- &context, sizeof(context), (std::uint64_t) current_stack->context);
+ &context, sizeof(context), remote(current_stack->context));
st->context = xbt_new0(s_mc_unw_context_t, 1);
if (mc_unw_init_context(st->context, &mc_model_checker->process(),
ignored_data.data = malloc(region->size);
// TODO, we should do this once per privatization segment:
snapshot->process->read_bytes(
- ignored_data.data, region->size, (std::uint64_t) region->addr,
+ ignored_data.data, region->size, remote(region->addr),
simgrid::mc::ProcessIndexDisabled);
xbt_dynar_push(snapshot->ignored_data, &ignored_data);
}
#include "mc_smx.h"
#include "mc_client.h"
+using simgrid::mc::remote;
+
extern "C" {
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_determinism, mc,
static void update_comm_pattern(mc_comm_pattern_t comm_pattern, smx_synchro_t comm_addr)
{
s_smx_synchro_t comm;
- mc_model_checker->process().read_bytes(
- &comm, sizeof(comm), (std::uint64_t)comm_addr);
+ mc_model_checker->process().read(&comm, remote(comm_addr));
smx_process_t src_proc = MC_smx_resolve_process(comm.comm.src_proc);
smx_process_t dst_proc = MC_smx_resolve_process(comm.comm.dst_proc);
comm_pattern->dst_host = MC_smx_process_get_host_name(dst_proc);
if (comm_pattern->data_size == -1 && comm.comm.src_buff != NULL) {
size_t buff_size;
- mc_model_checker->process().read_bytes(
- &buff_size, sizeof(buff_size), (std::uint64_t)comm.comm.dst_buff_size);
+ mc_model_checker->process().read(
+ &buff_size, remote(comm.comm.dst_buff_size));
comm_pattern->data_size = buff_size;
comm_pattern->data = xbt_malloc0(comm_pattern->data_size);
mc_model_checker->process().read_bytes(
comm_pattern->data, comm_pattern->data_size,
- (std::uint64_t) comm.comm.src_buff);
+ remote(comm.comm.src_buff));
}
}
pattern->data_size = synchro.comm.src_buff_size;
pattern->data = xbt_malloc0(pattern->data_size);
mc_model_checker->process().read_bytes(
- pattern->data, pattern->data_size, (std::uint64_t)synchro.comm.src_buff);
+ pattern->data, pattern->data_size, remote(synchro.comm.src_buff));
}
if(mpi_request.detached){
if (!initial_global_state->initial_communications_pattern_done) {
pattern->comm_addr = simcall_comm_irecv__get__result(request);
struct s_smpi_mpi_request mpi_request;
- mc_model_checker->process().read_bytes(
- &mpi_request, sizeof(mpi_request),
- (std::uint64_t) simcall_comm_irecv__get__data(request));
+ mc_model_checker->process().read(
+ &mpi_request, remote((struct s_smpi_mpi_request*)simcall_comm_irecv__get__data(request)));
pattern->tag = mpi_request.tag;
s_smx_synchro_t synchro;
- mc_model_checker->process().read_bytes(
- &synchro, sizeof(synchro), (std::uint64_t)pattern->comm_addr);
+ mc_model_checker->process().read(&synchro, remote(pattern->comm_addr));
char* remote_name;
- mc_model_checker->process().read_bytes(
- &remote_name, sizeof(remote_name),
- (std::uint64_t)(synchro.comm.rdv ? &synchro.comm.rdv->name : &synchro.comm.rdv_cpy->name));
+ mc_model_checker->process().read(&remote_name,
+ remote(synchro.comm.rdv ? &synchro.comm.rdv->name : &synchro.comm.rdv_cpy->name));
pattern->rdv =
MC_process_read_string(&mc_model_checker->process(), remote_name);
pattern->dst_proc = MC_smx_resolve_process(synchro.comm.dst_proc)->pid;
#include <xbt/probes.h>
+using simgrid::mc::remote;
+
typedef struct s_pointers_pair {
void *p1;
void *p2;
/* Init heap information used in heap comparison algorithm */
xbt_mheap_t heap1 = (xbt_mheap_t)s1->read_bytes(
alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
- (std::uint64_t)process->heap_address,
+ remote(process->heap_address),
simgrid::mc::ProcessIndexMissing, simgrid::mc::AddressSpace::Lazy);
xbt_mheap_t heap2 = (xbt_mheap_t)s2->read_bytes(
alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
- (std::uint64_t)process->heap_address,
+ remote(process->heap_address),
simgrid::mc::ProcessIndexMissing, simgrid::mc::AddressSpace::Lazy);
res_init = init_heap_information(heap1, heap2, s1->to_ignore, s2->to_ignore);
if (res_init == -1) {
state->heaplimit = ((struct mdesc *) heap1)->heaplimit;
- state->std_heap_copy = *MC_process_get_heap(&mc_model_checker->process());
+ state->std_heap_copy = *mc_model_checker->process().get_heap();
state->heapsize1 = heap1->heapsize;
state->heapsize2 = heap2->heapsize;
/* Heap information */
state->heaplimit = ((struct mdesc *) heap1)->heaplimit;
- state->std_heap_copy = *MC_process_get_heap(&mc_model_checker->process());
+ state->std_heap_copy = *mc_model_checker->process().get_heap();
state->heapbase1 = (char *) heap1 + BLOCKSIZE;
state->heapbase2 = (char *) heap2 + BLOCKSIZE;
#include "mc_object_info.h"
#include "mc_private.h"
+using simgrid::mc::remote;
+
extern "C" {
static int mc_dwarf_push_value(mc_expression_state_t state, Dwarf_Off value)
xbt_die("Missing address space");
state->address_space->read_bytes(
&state->stack[state->stack_size - 1], sizeof(uintptr_t),
- address, state->process_index);
+ remote(address), state->process_index);
}
break;
#include <xbt/mmalloc.h>
+using simgrid::mc::remote;
+
extern "C" {
// ***** Region management:
{
size_t* pagenos = (size_t*) malloc(page_count * sizeof(size_t));
- const bool is_self = MC_process_is_self(process);
+ const bool is_self = process->is_self();
void* temp = NULL;
if (!is_self)
*/
page_data = temp;
process->read_bytes(
- temp, xbt_pagesize, (std::uint64_t) page,
+ temp, xbt_pagesize, remote(page),
simgrid::mc::ProcessIndexDisabled);
}
pagenos[i] = mc_model_checker->page_store().store_page(page_data);
process->heap_info = NULL;
}
-}
-}
-
-extern "C" {
-
-void MC_process_refresh_heap(mc_process_t process)
+/** Refresh the information about the process
+ *
+ * Do not use direclty, this is used by the getters when appropriate
+ * in order to have fresh data.
+ */
+void Process::refresh_heap()
{
xbt_assert(mc_mode == MC_MODE_SERVER);
- xbt_assert(!MC_process_is_self(process));
+ xbt_assert(!this->is_self());
// Read/dereference/refresh the std_heap pointer:
- if (!process->heap) {
- process->heap = (struct mdesc*) malloc(sizeof(struct mdesc));
+ if (!this->heap) {
+ this->heap = (struct mdesc*) malloc(sizeof(struct mdesc));
}
- MC_process_read(process, simgrid::mc::AddressSpace::Normal,
- process->heap, process->heap_address, sizeof(struct mdesc),
+ MC_process_read(this, simgrid::mc::AddressSpace::Normal,
+ this->heap, this->heap_address, sizeof(struct mdesc),
simgrid::mc::ProcessIndexDisabled
);
- process->cache_flags |= MC_PROCESS_CACHE_FLAG_HEAP;
+ this->cache_flags |= MC_PROCESS_CACHE_FLAG_HEAP;
}
-void MC_process_refresh_malloc_info(mc_process_t process)
+/** Refresh the information about the process
+ *
+ * Do not use direclty, this is used by the getters when appropriate
+ * in order to have fresh data.
+ * */
+void Process::refresh_malloc_info()
{
xbt_assert(mc_mode == MC_MODE_SERVER);
- xbt_assert(!MC_process_is_self(process));
- if (!(process->cache_flags & MC_PROCESS_CACHE_FLAG_HEAP))
- MC_process_refresh_heap(process);
+ xbt_assert(!this->is_self());
+ if (!(this->cache_flags & MC_PROCESS_CACHE_FLAG_HEAP))
+ this->refresh_heap();
// Refresh process->heapinfo:
size_t malloc_info_bytesize =
- (process->heap->heaplimit + 1) * sizeof(malloc_info);
- process->heap_info = (malloc_info*) realloc(process->heap_info, malloc_info_bytesize);
- MC_process_read(process, simgrid::mc::AddressSpace::Normal,
- process->heap_info,
- process->heap->heapinfo, malloc_info_bytesize,
+ (this->heap->heaplimit + 1) * sizeof(malloc_info);
+ this->heap_info = (malloc_info*) realloc(this->heap_info, malloc_info_bytesize);
+ MC_process_read(this, simgrid::mc::AddressSpace::Normal,
+ this->heap_info,
+ this->heap->heapinfo, malloc_info_bytesize,
simgrid::mc::ProcessIndexDisabled);
- process->cache_flags |= MC_PROCESS_CACHE_FLAG_MALLOC_INFO;
+ this->cache_flags |= MC_PROCESS_CACHE_FLAG_MALLOC_INFO;
+}
+
}
+}
+
+extern "C" {
#define SO_RE "\\.so[\\.0-9]*$"
#define VERSION_RE "-[\\.0-9]*$"
{
if (!address)
return NULL;
- if (MC_process_is_self(process))
+ if (process->is_self())
return strdup((char*) address);
off_t len = 128;
static void MC_process_open_memory_file(mc_process_t process)
{
- if (MC_process_is_self(process) || process->memory_file >= 0)
+ if (process->is_self() || process->memory_file >= 0)
return;
int fd = MC_process_vm_open(process->pid, O_RDWR);
namespace mc {
const void *Process::read_bytes(void* buffer, std::size_t size,
- std::uint64_t address, int process_index,
+ remote_ptr<void> address, int process_index,
AddressSpace::ReadMode mode)
{
if (process_index != simgrid::mc::ProcessIndexDisabled) {
- mc_object_info_t info = MC_process_find_object_info_rw(this, (void*)address);
+ mc_object_info_t info = MC_process_find_object_info_rw(this, (void*)address.address());
// Segment overlap is not handled.
if (MC_object_info_is_privatized(info)) {
if (process_index < 0)
xbt_die("Missing process index");
// Address translation in the privaization segment:
// TODO, fix me (broken)
- size_t offset = address - (std::uint64_t)info->start_rw;
- address = address - offset;
+ size_t offset = address.address() - (std::uint64_t)info->start_rw;
+ address = remote(address.address() - offset);
}
}
- if (MC_process_is_self(this)) {
+ if (this->is_self()) {
if (mode == simgrid::mc::AddressSpace::Lazy)
- return (void*)address;
+ return (void*)address.address();
else {
- memcpy(buffer, (void*)address, size);
+ memcpy(buffer, (void*)address.address(), size);
return buffer;
}
} else {
- if (pread_whole(this->memory_file, buffer, size, (off_t) address) < 0)
+ if (pread_whole(this->memory_file, buffer, size, (off_t) address.address()) < 0)
xbt_die("Read from process %lli failed", (long long) this->pid);
return buffer;
}
void MC_process_write(mc_process_t process, const void* local, void* remote, size_t len)
{
- if (MC_process_is_self(process)) {
+ if (process->is_self()) {
memcpy(remote, local, len);
} else {
if (pwrite_whole(process->memory_file, local, len, (off_t) remote) < 0)
void MC_process_clear_memory(mc_process_t process, void* remote, size_t len)
{
- if (MC_process_is_self(process)) {
+ if (process->is_self()) {
memset(remote, 0, len);
} else {
pthread_once(&zero_buffer_flag, MC_zero_buffer_init);
Process(pid_t pid, int sockfd);
~Process();
const void* read_bytes(void* buffer, std::size_t size,
- std::uint64_t address, int process_index = ProcessIndexAny,
+ remote_ptr<void> address, int process_index = ProcessIndexAny,
ReadMode mode = Normal) override;
+ xbt_mheap_t get_heap()
+ {
+ if (!(this->cache_flags & MC_PROCESS_CACHE_FLAG_HEAP))
+ this->refresh_heap();
+ return this->heap;
+ }
+ malloc_info* get_malloc_info()
+ {
+ if (!(this->cache_flags & MC_PROCESS_CACHE_FLAG_MALLOC_INFO))
+ this->refresh_malloc_info();
+ return this->heap_info;
+ }
+ bool is_self()
+ {
+ return this->process_flags & MC_PROCESS_SELF_FLAG;
+ }
+private:
+ void refresh_heap();
+ void refresh_malloc_info();
public: // to be private
mc_process_flags_t process_flags;
pid_t pid;
*
* This is refreshed with the `MC_process_refresh` call.
* This is not used if the process is the current one:
- * use `MC_process_get_heap_info` in order to use it.
+ * use `get_heap_info()` in order to use it.
*/
xbt_mheap_t heap;
*
* This is refreshed with the `MC_process_refresh` call.
* This is not used if the process is the current one:
- * use `MC_process_get_malloc_info` in order to use it.
+ * use `get_malloc_info()` in order to use it.
*/
malloc_info* heap_info;
SG_BEGIN_DECL()
-int MC_process_vm_open(pid_t pid, int flags);
-
-/** Refresh the information about the process
- *
- * Do not use direclty, this is used by the getters when appropriate
- * in order to have fresh data.
+/** Open a FD to a remote process memory (`/dev/$pid/mem`)
*/
-XBT_INTERNAL void MC_process_refresh_heap(mc_process_t process);
-
-/** Refresh the information about the process
- *
- * Do not use direclty, this is used by the getters when appropriate
- * in order to have fresh data.
- * */
-XBT_INTERNAL void MC_process_refresh_malloc_info(mc_process_t process);
-
-static inline
-bool MC_process_is_self(mc_process_t process)
-{
- return process->process_flags & MC_PROCESS_SELF_FLAG;
-}
+int MC_process_vm_open(pid_t pid, int flags);
/* Process memory access: */
XBT_INTERNAL void MC_process_read_variable(mc_process_t process, const char* name, void* target, size_t size);
XBT_INTERNAL char* MC_process_read_string(mc_process_t, void* address);
-static inline xbt_mheap_t MC_process_get_heap(mc_process_t process)
-{
- if (!(process->cache_flags & MC_PROCESS_CACHE_FLAG_HEAP))
- MC_process_refresh_heap(process);
- return process->heap;
-}
-
-static inline malloc_info* MC_process_get_malloc_info(mc_process_t process)
-{
- if (!(process->cache_flags & MC_PROCESS_CACHE_FLAG_MALLOC_INFO))
- MC_process_refresh_malloc_info(process);
- return process->heap_info;
-}
-
/** Find (one occurence of) the named variable definition
*/
XBT_INTERNAL dw_variable_t MC_process_find_variable_by_name(mc_process_t process, const char* name);
void MC_process_smx_refresh(mc_process_t process)
{
xbt_assert(mc_mode == MC_MODE_SERVER);
- xbt_assert(!MC_process_is_self(process));
+ xbt_assert(!process->is_self());
if (process->cache_flags & MC_PROCESS_CACHE_FLAG_SIMIX_PROCESSES)
return;
}
const void* Snapshot::read_bytes(void* buffer, std::size_t size,
- std::uint64_t address, int process_index,
+ remote_ptr<void> address, int process_index,
AddressSpace::ReadMode mode)
{
- mc_mem_region_t region = mc_get_snapshot_region((void*)address, this, process_index);
+ mc_mem_region_t region = mc_get_snapshot_region((void*)address.address(), this, process_index);
if (region) {
- const void* res = MC_region_read(region, buffer, (void*)address, size);
+ const void* res = MC_region_read(region, buffer, (void*)address.address(), size);
if (buffer == res || mode == AddressSpace::Lazy)
return res;
else {
}
}
else
- return MC_process_read(this->process, mode, buffer, (void*)address, size, process_index);
+ return MC_process_read(this->process, mode, buffer, (void*)address.address(), size, process_index);
}
}
Snapshot();
~Snapshot();
const void* read_bytes(void* buffer, std::size_t size,
- std::uint64_t address, int process_index = ProcessIndexAny,
+ remote_ptr<void> address, int process_index = ProcessIndexAny,
ReadMode mode = Normal) override;
public: // To be private
mc_process_t process;
simgrid::mc::AddressSpace::ReadMode mode,
void* target, const void* addr, size_t size, int process_index)
{
- return snapshot->read_bytes(target, size, (uint64_t)addr, process_index, mode);
+ return snapshot->read_bytes(target, size, simgrid::mc::remote(addr),
+ process_index, mode);
}
MC_SHOULD_BE_INTERNAL int MC_snapshot_region_memcmp(
{
if(snapshot==NULL)
xbt_die("snapshot is NULL");
- return MC_process_get_heap(&mc_model_checker->process())->breakval;
+ return mc_model_checker->process().get_heap()->breakval;
}
/** @brief Read memory from a snapshot region
#include "mc_process.h"
#include "mc_unw.h"
+using simgrid::mc::remote;
+
extern "C" {
// ***** Implementation
mc_unw_context_t context = (mc_unw_context_t) arg;
if (write)
return - UNW_EREADONLYREG;
- context->address_space->read_bytes(valp, sizeof(unw_word_t), addr);
+ context->address_space->read_bytes(valp, sizeof(unw_word_t), remote(addr));
return 0;
}
mc_address_space_t as = context->address_space;
mc_process_t process = dynamic_cast<mc_process_t>(as);
- if (process && MC_process_is_self(process))
+ if (process && process->is_self())
return unw_init_local(cursor, &context->context);
return unw_init_remote(cursor, context->process->unw_addr_space, context);
mc_process_t process = &(mc_model_checker->process());
mc_visited_state_t new_state = xbt_new0(s_mc_visited_state_t, 1);
new_state->heap_bytes_used = mmalloc_get_bytes_used_remote(
- MC_process_get_heap(process)->heaplimit,
- MC_process_get_malloc_info(process));
+ process->get_heap()->heaplimit,
+ process->get_malloc_info());
- if (MC_process_is_self(&mc_model_checker->process())) {
+ if (mc_model_checker->process().is_self()) {
new_state->nb_processes = xbt_swag_size(simix_global->process_list);
} else {
MC_process_smx_refresh(&mc_model_checker->process());
if(pair->graph_state->system_state == NULL)
pair->graph_state->system_state = MC_take_snapshot(pair_num);
pair->heap_bytes_used = mmalloc_get_bytes_used_remote(
- MC_process_get_heap(process)->heaplimit,
- MC_process_get_malloc_info(process));
- if (MC_process_is_self(&mc_model_checker->process())) {
+ process->get_heap()->heaplimit,
+ process->get_malloc_info());
+ if (mc_model_checker->process().is_self()) {
pair->nb_processes = xbt_swag_size(simix_global->process_list);
} else {
MC_process_smx_refresh(&mc_model_checker->process());