- case REQ_COMM_ISEND:
- type = bprintf("iSend");
- args = bprintf("src=%s, buff=%p, size=%zu", req->issuer->name,
- req->comm_isend.src_buff, req->comm_isend.src_buff_size);
- break;
- case REQ_COMM_IRECV:
- size = req->comm_irecv.dst_buff_size ? *req->comm_irecv.dst_buff_size : 0;
- type = bprintf("iRecv");
- args = bprintf("dst=%s, buff=%p, size=%zu", req->issuer->name,
- req->comm_irecv.dst_buff, size);
- break;
- case REQ_COMM_WAIT:
- act = req->comm_wait.comm;
- if(value == -1){
- type = bprintf("Wait Timeout");
- args = bprintf("comm=%p", act);
- }else{
- type = bprintf("Wait");
- args = bprintf("comm=%p [%s(%lu) -> %s(%lu)]", act,
- act->comm.src_proc ? act->comm.src_proc->name : "",
- act->comm.src_proc ? act->comm.src_proc->pid : 0,
- act->comm.dst_proc ? act->comm.dst_proc->name : "",
- act->comm.dst_proc ? act->comm.dst_proc->pid : 0);
- }
- break;
- case REQ_COMM_TEST:
- act = req->comm_test.comm;
- if(act->comm.src_proc == NULL || act->comm.src_proc == NULL){
- type = bprintf("Test FALSE");
- args = bprintf("comm=%p", act);
- }else{
- type = bprintf("Test TRUE");
- args = bprintf("comm=%p [%s -> %s]", act,
- act->comm.src_proc ? act->comm.src_proc->name : "",
- act->comm.dst_proc ? act->comm.dst_proc->name : "");
- }
- break;
-
- case REQ_COMM_WAITANY:
- type = bprintf("WaitAny");
- args = bprintf("-");
- /* FIXME: improve output */
- break;
-
- case REQ_COMM_TESTANY:
- type = bprintf("TestAny");
- args = bprintf("-");
- /* FIXME: improve output */
- break;
-
- default:
- THROW_UNIMPLEMENTED;
+ case SIMCALL_COMM_ISEND:
+ type = xbt_strdup("iSend");
+ p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
+ bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
+ args = bprintf("src=%s, buff=%s, size=%s", req->issuer->name, p, bs);
+ break;
+ case SIMCALL_COMM_IRECV:
+ size = simcall_comm_irecv__get__dst_buff_size(req) ? *simcall_comm_irecv__get__dst_buff_size(req) : 0;
+ type = xbt_strdup("iRecv");
+ p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
+ bs = buff_size_to_string(size);
+ args = bprintf("dst=%s, buff=%s, size=%s", req->issuer->name, p, bs);
+ break;
+ case SIMCALL_COMM_WAIT:
+ act = simcall_comm_wait__get__comm(req);
+ if(value == -1){
+ type = xbt_strdup("WaitTimeout");
+ p = pointer_to_string(act);
+ args = bprintf("comm=%p", p);
+ }else{
+ type = xbt_strdup("Wait");
+ p = pointer_to_string(act);
+ args = bprintf("comm=%s [(%lu)%s -> (%lu)%s]", p,
+ act->comm.src_proc ? act->comm.src_proc->pid : 0,
+ act->comm.src_proc ? act->comm.src_proc->name : "",
+ act->comm.dst_proc ? act->comm.dst_proc->pid : 0,
+ act->comm.dst_proc ? act->comm.dst_proc->name : "");
+ }
+ break;
+ case SIMCALL_COMM_TEST:
+ act = simcall_comm_test__get__comm(req);
+ if(act->comm.src_proc == NULL || act->comm.dst_proc == NULL){
+ type = xbt_strdup("Test FALSE");
+ p = pointer_to_string(act);
+ args = bprintf("comm=%s", p);
+ }else{
+ type = xbt_strdup("Test TRUE");
+ p = pointer_to_string(act);
+ args = bprintf("comm=%s [(%lu)%s -> (%lu)%s]", p,
+ act->comm.src_proc->pid, act->comm.src_proc->name,
+ act->comm.dst_proc->pid, act->comm.dst_proc->name);
+ }
+ break;
+
+ case SIMCALL_COMM_WAITANY:
+ type = xbt_strdup("WaitAny");
+ p = pointer_to_string(xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_action_t));
+ args = bprintf("comm=%s (%d of %lu)", p,
+ value+1, xbt_dynar_length(simcall_comm_waitany__get__comms(req)));
+ break;
+
+ case SIMCALL_COMM_TESTANY:
+ if(value == -1){
+ type = xbt_strdup("TestAny FALSE");
+ args = xbt_strdup("-");
+ }else{
+ type = xbt_strdup("TestAny");
+ args = bprintf("(%d of %lu)", value+1, xbt_dynar_length(simcall_comm_testany__get__comms(req)));
+ }
+ break;
+
+ case SIMCALL_MC_SNAPSHOT:
+ type = xbt_strdup("MC_SNAPSHOT");
+ args = '\0';
+ break;
+
+ case SIMCALL_MC_COMPARE_SNAPSHOTS:
+ type = xbt_strdup("MC_COMPARE_SNAPSHOTS");
+ args = '\0';
+ break;
+
+ default:
+ THROW_UNIMPLEMENTED;