Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Actor: make the refcount observable, and improve debug messages
[simgrid.git] / src / simix / smx_global.cpp
index 9510c95..ca3e4b9 100644 (file)
@@ -171,7 +171,7 @@ void Global::empty_trash()
   while (not actors_to_destroy.empty()) {
     smx_actor_t actor = &actors_to_destroy.front();
     actors_to_destroy.pop_front();
-    XBT_DEBUG("Getting rid of %p", actor);
+    XBT_DEBUG("Getting rid of %s (refcount: %d)", actor->get_cname(), actor->get_refcount());
     intrusive_ptr_release(actor);
   }
 #if SIMGRID_HAVE_MC
@@ -187,7 +187,7 @@ void Global::empty_trash()
  */
 void Global::run_all_actors()
 {
-  SIMIX_context_runall();
+  simix_global->context_factory->run_all();
 
   actors_to_run.swap(actors_that_ran);
   actors_to_run.clear();
@@ -284,7 +284,7 @@ void SIMIX_clean()
 
   /* Kill all processes (but maestro) */
   simix_global->maestro_process->kill_all();
-  SIMIX_context_runall();
+  simix_global->context_factory->run_all();
   simix_global->empty_trash();
 
   /* Exit the SIMIX network module */