Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
useless cosmetics around NS3 long routes
[simgrid.git] / src / mc / mc_checkpoint.cpp
index d17abc8..84cdfd8 100644 (file)
 
 #include "src/internal_config.h"
 #include "src/mc/mc_private.h"
-#include "xbt/module.h"
-#include <xbt/mmalloc.h>
-#include <xbt/memory.hpp>
 #include "src/smpi/private.h"
+#include "xbt/mmalloc.h"
+#include "xbt/module.h"
 
 #include "src/xbt/mmalloc/mmprivate.h"
 
 #include "src/mc/mc_private.h"
 #include <mc/mc.h>
 
-#include "src/mc/mc_snapshot.h"
+#include "src/mc/mc_hash.hpp"
 #include "src/mc/mc_mmu.h"
-#include "src/mc/mc_unw.h"
-#include "src/mc/mc_protocol.h"
 #include "src/mc/mc_smx.h"
-#include "mc_hash.hpp"
+#include "src/mc/mc_snapshot.h"
+#include "src/mc/mc_unw.h"
+#include "src/mc/remote/mc_protocol.h"
 
 #include "src/mc/RegionSnapshot.hpp"
 #include "src/mc/ObjectInformation.hpp"
@@ -46,8 +45,7 @@
 
 using simgrid::mc::remote;
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkpoint, mc,
-                                "Logging specific to mc_checkpoint");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkpoint, mc, "Logging specific to mc_checkpoint");
 
 namespace simgrid {
 namespace mc {
@@ -367,7 +365,8 @@ static std::vector<s_mc_stack_frame_t> unwind_stack_frames(simgrid::mc::UnwindCo
 
       stack_frame.unw_cursor = c;
 
-      unw_word_t ip, sp;
+      unw_word_t ip;
+      unw_word_t sp;
 
       unw_get_reg(&c, UNW_REG_IP, &ip);
       unw_get_reg(&c, UNW_REG_SP, &sp);
@@ -563,12 +562,9 @@ std::shared_ptr<simgrid::mc::Snapshot> take_snapshot(int num_state)
 
   simgrid::mc::Process* mc_process = &mc_model_checker->process();
 
-  std::shared_ptr<simgrid::mc::Snapshot> snapshot =
-    std::make_shared<simgrid::mc::Snapshot>(mc_process);
-
-  snapshot->num_state = num_state;
+  std::shared_ptr<simgrid::mc::Snapshot> snapshot = std::make_shared<simgrid::mc::Snapshot>(mc_process, num_state);
 
-  for (auto& p : mc_model_checker->process().simix_processes())
+  for (auto& p : mc_model_checker->process().actors())
     snapshot->enabled_processes.insert(p.copy.getBuffer()->pid);
 
   snapshot_handle_ignore(snapshot.get());
@@ -581,7 +577,7 @@ std::shared_ptr<simgrid::mc::Snapshot> take_snapshot(int num_state)
 
   snapshot->to_ignore = mc_model_checker->process().ignored_heap();
 
-  if (_sg_mc_visited > 0 || strcmp(_sg_mc_property_file, "")) {
+  if (_sg_mc_max_visited_states > 0 || strcmp(_sg_mc_property_file, "")) {
     snapshot->stacks = take_snapshot_stacks(snapshot.get());
     if (_sg_mc_hash)
       snapshot->hash = simgrid::mc::hash(*snapshot);