- simgrid::mc::wait_for_requests();
-
- for (simgrid::mc::Transition const& transition : trace) {
- XBT_DEBUG("Executing %i$%i", transition.pid_, transition.argument_);
-
- // Choose a request:
- smx_actor_t process = SIMIX_process_from_PID(transition.pid_);
- if (not process)
- xbt_die("Unexpected process (pid:%d).", transition.pid_);
- const s_smx_simcall* simcall = &(process->simcall);
- if (simcall == nullptr || simcall->call_ == SIMCALL_NONE)
- xbt_die("No simcall for process %d.", transition.pid_);
- if (not simgrid::mc::request_is_visible(simcall) || not simgrid::mc::actor_is_enabled(process))
- xbt_die("Unexpected simcall.");
+ simgrid::mc::execute_actors();
+ auto* engine = kernel::EngineImpl::get_instance();
+
+ int frame_count = 1;
+ if (xbt_log_no_loc)
+ XBT_INFO("The backtrace of each transition will not be shown because of --log=no_loc");
+ else
+ simgrid_mc_replay_show_backtraces = true;
+
+ for (const simgrid::mc::Transition* transition : transitions_) {
+ kernel::actor::ActorImpl* actor = engine->get_actor_by_pid(transition->aid_);
+ xbt_assert(actor != nullptr, "Unexpected actor (id:%ld).", transition->aid_);
+ const kernel::actor::Simcall* simcall = &(actor->simcall_);
+ xbt_assert(simgrid::mc::request_is_visible(simcall), "Simcall %s of actor %s is not visible.", simcall->get_cname(),
+ actor->get_cname());
+
+ XBT_INFO("***********************************************************************************");
+ XBT_INFO("* Path chunk #%d '%ld/%i' Actor %s(pid:%ld): %s", frame_count++, transition->aid_,
+ transition->times_considered_, simcall->issuer_->get_cname(), simcall->issuer_->get_pid(),
+ simcall->observer_->to_string().c_str());
+ XBT_INFO("***********************************************************************************");
+ if (not mc::actor_is_enabled(actor))
+ simgrid::kernel::EngineImpl::get_instance()->display_all_actor_status();
+
+ xbt_assert(simgrid::mc::actor_is_enabled(actor), "Actor %s (simcall %s) is not enabled.", actor->get_cname(),
+ simcall->get_cname());