Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix process_time handling
authorGabriel Corona <gabriel.corona@loria.fr>
Wed, 23 Mar 2016 13:48:08 +0000 (14:48 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Wed, 23 Mar 2016 13:48:08 +0000 (14:48 +0100)
src/mc/mc_global.cpp
src/mc/mc_liveness.cpp
src/mc/mc_record.cpp
src/mc/mc_record.h
src/simix/smx_global.cpp

index 9f231b9..3c0d732 100644 (file)
@@ -105,6 +105,7 @@ void MC_run()
   xbt_swag_foreach(process, simix_global->process_list)
     MC_ignore_heap(&(process->process_hookup), sizeof(process->process_hookup));
   simgrid::mc::Client::get()->mainLoop();
+  simgrid::mc::processes_time.clear();
 }
 
 /**
index d5447bd..cc9897d 100644 (file)
@@ -554,9 +554,6 @@ int modelcheck_liveness(void)
   MC_pre_modelcheck_liveness();
   int res = MC_modelcheck_liveness_main();
 
-  /* We're done */
-  simgrid::mc::processes_time.clear();
-
   return res;
 }
 
index 494f961..479b8dc 100644 (file)
@@ -180,15 +180,12 @@ void MC_record_dump_path(xbt_fifo_t stack)
 
 void MC_record_replay_from_string(const char* path_string)
 {
+  simgrid::mc::processes_time.resize(simix_process_maxpid);
   xbt_dynar_t path = MC_record_from_string(path_string);
   mc_record_item_t start = &xbt_dynar_get_as(path, 0, s_mc_record_item_t);
   MC_record_replay(start, xbt_dynar_length(path));
   xbt_dynar_free(&path);
-}
-
-void MC_record_replay_init()
-{
-  simgrid::mc::processes_time.resize(simix_process_maxpid);
+  simgrid::mc::processes_time.clear();
 }
 
 }
index 17493f0..88911c0 100644 (file)
@@ -76,8 +76,6 @@ XBT_PRIVATE void MC_record_replay(mc_record_item_t start, size_t count);
  */
 XBT_PRIVATE void MC_record_replay_from_string(const char* data);
 
-XBT_PRIVATE void MC_record_replay_init(void);
-
 SG_END_DECL()
 
 #endif
index 0b705ad..f783f8b 100644 (file)
@@ -380,8 +380,7 @@ static int process_syscall_color(void *p)
  */
 void SIMIX_run(void)
 {
-  if(MC_record_path) {
-    MC_record_replay_init();
+  if (MC_record_path) {
     MC_record_replay_from_string(MC_record_path);
     return;
   }