// object_info
mc_object_info_t MC_new_object_info(void) {
- mc_object_info_t res = xbt_new(s_mc_object_info_t, 1);
- res->file_name = NULL;
- res->start_text = NULL;
- res->start_data = NULL;
- res->start_bss = NULL;
+ mc_object_info_t res = xbt_new0(s_mc_object_info_t, 1);
res->local_variables = xbt_dict_new_homogeneous(NULL);
res->global_variables = xbt_dynar_new(sizeof(dw_variable_t), dw_variable_free_voidp);
res->types = xbt_dict_new_homogeneous(NULL);
xbt_dynar_free(&(*info)->global_variables);
xbt_dict_free(&(*info)->types);
xbt_free(info);
- info = NULL;
+ *info = NULL;
}
/*************************************************************************/
/* Save the initial state */
initial_state_safety = xbt_new0(s_mc_global_t, 1);
initial_state_safety->snapshot = MC_take_snapshot(0);
+ initial_state_safety->initial_communications_pattern_done = 0;
+ initial_state_safety->comm_deterministic = 1;
+ initial_state_safety->send_deterministic = 1;
MC_UNSET_RAW_MEM;
MC_dpor();
void MC_exit(void)
{
xbt_free(mc_time);
+
MC_memory_exit();
//xbt_abort();
}
xbt_fifo_item_t item, start_item;
mc_state_t state;
smx_process_t process = NULL;
+ int comm_pattern = 0;
XBT_DEBUG("**** Begin Replay ****");
xbt_free(key);
}
}
+ xbt_dynar_reset(communications_pattern);
MC_UNSET_RAW_MEM;
xbt_free(req_str);
}
}
+
+ if(req->call == SIMCALL_COMM_ISEND)
+ comm_pattern = 1;
+ else if(req->call == SIMCALL_COMM_IRECV)
+ comm_pattern = 2;
SIMIX_simcall_pre(req, value);
+
+ MC_SET_RAW_MEM;
+ if(comm_pattern != 0){
+ get_comm_pattern(communications_pattern, req, comm_pattern);
+ }
+ MC_UNSET_RAW_MEM;
+
+ comm_pattern = 0;
+
MC_wait_for_requests();
count++;
fprintf(dot_output, "}\n");
fclose(dot_output);
}
+ if(initial_state_safety != NULL){
+ // XBT_INFO("Communication-deterministic : %s", !initial_state_safety->comm_deterministic ? "No" : "Yes");
+ // XBT_INFO("Send-deterministic : %s", !initial_state_safety->send_deterministic ? "No" : "Yes");
+ }
MC_UNSET_RAW_MEM;
}