X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/66a9e81ebcdd1b8226c0f390bbf09b54826d2c7f..2e501076bf39bf43b598954f040b453fedf49f4c:/src/mc/mc_global.cpp diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index a3b0921f65..86891d46cb 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -28,7 +28,6 @@ #include "mc_record.h" #ifdef HAVE_MC -#include "src/mc/Server.hpp" #include #include #include "../xbt/mmalloc/mmprivate.h" @@ -63,8 +62,6 @@ int user_max_depth_reached = 0; mc_state_t mc_current_state = NULL; char mc_replay_mode = FALSE; -__thread mc_comparison_times_t mc_comp_times = NULL; -__thread double mc_snapshot_comparison_time; mc_stats_t mc_stats = NULL; mc_global_t initial_global_state = NULL; xbt_fifo_t mc_stack = NULL; @@ -80,7 +77,7 @@ const char *colors[13]; /******************************* Initialisation of MC *******************************/ /*********************************************************************************/ -static void MC_init_dot_output() +void MC_init_dot_output() { /* FIXME : more colors */ colors[0] = "blue"; @@ -127,46 +124,6 @@ void MC_init() } } -void MC_init_model_checker(pid_t pid, int socket) -{ - mc_model_checker = new simgrid::mc::ModelChecker(pid, socket); - - mc_comp_times = xbt_new0(s_mc_comparison_times_t, 1); - - /* Initialize statistics */ - mc_stats = xbt_new0(s_mc_stats_t, 1); - mc_stats->state_size = 1; - - if ((_sg_mc_dot_output_file != NULL) && (_sg_mc_dot_output_file[0] != '\0')) - MC_init_dot_output(); - - /* Init parmap */ - //parmap = xbt_parmap_mc_new(xbt_os_get_numcores(), XBT_PARMAP_DEFAULT); - - /* Ignore some variables from xbt/ex.h used by exception e for stacks comparison */ - MC_ignore_local_variable("e", "*"); - MC_ignore_local_variable("__ex_cleanup", "*"); - MC_ignore_local_variable("__ex_mctx_en", "*"); - MC_ignore_local_variable("__ex_mctx_me", "*"); - MC_ignore_local_variable("__xbt_ex_ctx_ptr", "*"); - MC_ignore_local_variable("_log_ev", "*"); - MC_ignore_local_variable("_throw_ctx", "*"); - MC_ignore_local_variable("ctx", "*"); - - MC_ignore_local_variable("self", "simcall_BODY_mc_snapshot"); - MC_ignore_local_variable("next_cont" - "ext", "smx_ctx_sysv_suspend_serial"); - MC_ignore_local_variable("i", "smx_ctx_sysv_suspend_serial"); - - /* Ignore local variable about time used for tracing */ - MC_ignore_local_variable("start_time", "*"); - - /* Static variable used for tracing */ - MCer_ignore_global_variable("counter"); - - /* SIMIX */ - MCer_ignore_global_variable("smx_total_comms"); -} #endif /******************************* Core of MC *******************************/ @@ -304,7 +261,7 @@ void MC_replay(xbt_fifo_t stack) if (_sg_mc_comms_determinism || _sg_mc_send_determinism) MC_handle_comm_pattern(call, req, value, NULL, 1); - MC_wait_for_requests(); + mc_model_checker->wait_for_requests(); count++; } @@ -371,7 +328,7 @@ void MC_replay_liveness(xbt_fifo_t stack) } MC_simcall_handle(req, value); - MC_wait_for_requests(); + mc_model_checker->wait_for_requests(); } /* Update statistics */