Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Activate assert when debug log is active.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 13 Mar 2019 14:16:00 +0000 (15:16 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 13 Mar 2019 14:40:53 +0000 (15:40 +0100)
src/simix/popping.cpp

index 70d34c7..c482ab8 100644 (file)
@@ -14,12 +14,10 @@ void SIMIX_simcall_answer(smx_simcall_t simcall)
     XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), (int)simcall->call,
               simcall->issuer->get_cname(), simcall->issuer);
     simcall->issuer->simcall.call = SIMCALL_NONE;
     XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), (int)simcall->call,
               simcall->issuer->get_cname(), simcall->issuer);
     simcall->issuer->simcall.call = SIMCALL_NONE;
-#if 0
-    /* This check should be useless and slows everyone. Reactivate if you see something weird in process scheduling. */
-    if (std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), simcall->issuer) !=
-        end(simix_global->actors_to_run))
-      DIE_IMPOSSIBLE;
-#endif
+    xbt_assert(not XBT_LOG_ISENABLED(simix_popping, xbt_log_priority_debug) ||
+                   std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), simcall->issuer) ==
+                       end(simix_global->actors_to_run),
+               "Actor %p should not exist in actors_to_run!", simcall->issuer);
     simix_global->actors_to_run.push_back(simcall->issuer);
   }
 }
     simix_global->actors_to_run.push_back(simcall->issuer);
   }
 }