- case SIMCALL_COMM_IRECV: {
- size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
-
- // size_t size = size_pointer ? *size_pointer : 0;
- size_t size = 0;
- if (remote_size)
- mc_model_checker->process().read_bytes(&size, sizeof(size),
- remote(remote_size));
-
- type = "iRecv";
- char* p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
- char* bs = buff_size_to_string(size);
- if (issuer->host)
- args =
- bprintf("dst=(%lu)%s (%s), buff=%s, size=%s", issuer->pid,
- MC_smx_process_get_host_name(issuer),
- MC_smx_process_get_name(issuer),
- p, bs);
- else
- args =
- bprintf("dst=(%lu)%s, buff=%s, size=%s", issuer->pid,
- MC_smx_process_get_name(issuer),
- p, bs);
- xbt_free(bs);
- xbt_free(p);
- break;
- }
+ switch (req->call_) {
+ case SIMCALL_COMM_ISEND: {
+ type = "iSend";
+ char* p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
+ char* bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
+ if (issuer->get_host())
+ args = bprintf("src=(%ld)%s (%s), buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
+ MC_smx_actor_get_name(issuer), p, bs);
+ else
+ args = bprintf("src=(%ld)%s, buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_name(issuer), p, bs);
+ xbt_free(bs);
+ xbt_free(p);
+ break;
+ }
+
+ case SIMCALL_COMM_IRECV: {
+ size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
+ size_t size = 0;
+ if (remote_size)
+ mc_model_checker->get_remote_simulation().read_bytes(&size, sizeof(size), remote(remote_size));
+
+ type = "iRecv";
+ char* p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
+ char* bs = buff_size_to_string(size);
+ if (issuer->get_host())
+ args = bprintf("dst=(%ld)%s (%s), buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
+ MC_smx_actor_get_name(issuer), p, bs);
+ else
+ args = bprintf("dst=(%ld)%s, buff=%s, size=%s", issuer->get_pid(), MC_smx_actor_get_name(issuer), p, bs);
+ xbt_free(bs);
+ xbt_free(p);
+ break;
+ }
+
+ case SIMCALL_COMM_WAIT: {
+ simgrid::kernel::activity::CommImpl* remote_act =
+ static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(req));
+ char* p;
+ if (value == -1) {
+ type = "WaitTimeout";
+ p = pointer_to_string(remote_act);
+ args = bprintf("comm=%s", p);
+ } else {
+ type = "Wait";
+ p = pointer_to_string(remote_act);
+
+ simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
+ const simgrid::kernel::activity::CommImpl* act;
+ if (use_remote_comm) {
+ mc_model_checker->get_remote_simulation().read(
+ temp_synchro, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
+ act = temp_synchro.get_buffer();
+ } else
+ act = remote_act;
+
+ smx_actor_t src_proc =
+ mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
+ smx_actor_t dst_proc =
+ mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
+ args = bprintf("comm=%s [(%ld)%s (%s)-> (%ld)%s (%s)]", p, src_proc ? src_proc->get_pid() : 0,
+ src_proc ? MC_smx_actor_get_host_name(src_proc) : "",
+ src_proc ? MC_smx_actor_get_name(src_proc) : "", dst_proc ? dst_proc->get_pid() : 0,
+ dst_proc ? MC_smx_actor_get_host_name(dst_proc) : "",
+ dst_proc ? MC_smx_actor_get_name(dst_proc) : "");
+ }
+ xbt_free(p);
+ break;
+ }