Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change simcall functions
[simgrid.git] / src / mc / mc_checkpoint.c
index df6c9c4..4af29d3 100644 (file)
@@ -171,6 +171,10 @@ void MC_init_memory_map_info(){
 
 }
 
+mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall){
+  return MC_take_snapshot();
+}
+
 mc_snapshot_t MC_take_snapshot()
 {
 
@@ -245,7 +249,8 @@ mc_snapshot_t MC_take_snapshot()
     }
   }
 
-  snapshot->stacks = take_snapshot_stacks(heap);
+  if(_surf_mc_visited > 0 || strcmp(_surf_mc_property_file,""))
+    snapshot->stacks = take_snapshot_stacks(heap);
   
   free_memory_map(maps);
 
@@ -296,8 +301,10 @@ void get_libsimgrid_plt_section(){
 
   fp = popen(command, "r");
 
-  if(fp == NULL)
+  if(fp == NULL){
     perror("popen failed");
+    xbt_abort();
+  }
 
   while ((read = getline(&line, &n, fp)) != -1 && plt_not_found == 1) {
 
@@ -352,8 +359,10 @@ void get_binary_plt_section(){
 
   fp = popen(command, "r");
 
-  if(fp == NULL)
+  if(fp == NULL){
     perror("popen failed");
+    xbt_abort();
+  }
 
   while ((read = getline(&line, &n, fp)) != -1 && plt_not_found == 1) {