From: Gabriel Corona Date: Thu, 14 Apr 2016 12:23:01 +0000 (+0200) Subject: [mc] Rename replay() function to restoreState() X-Git-Tag: v3_13~97^2~2^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0563f70508b46dff06649ad8795d3793d7a46c49 [mc] Rename replay() function to restoreState() because sometimes we restore the state without replaying anything. --- diff --git a/src/mc/CommunicationDeterminismChecker.cpp b/src/mc/CommunicationDeterminismChecker.cpp index 2a32b59502..3eb634d388 100644 --- a/src/mc/CommunicationDeterminismChecker.cpp +++ b/src/mc/CommunicationDeterminismChecker.cpp @@ -517,7 +517,7 @@ int CommunicationDeterminismChecker::main(void) state->num, stack_.size() + 1); stack_.push_back(std::move(state)); - simgrid::mc::replay(stack_); + simgrid::mc::restoreState(stack_); XBT_DEBUG("Back-tracking to state %d at depth %zi done", stack_.back()->num, stack_.size()); diff --git a/src/mc/SafetyChecker.cpp b/src/mc/SafetyChecker.cpp index 4064b6aaf4..a2ce9d4eca 100644 --- a/src/mc/SafetyChecker.cpp +++ b/src/mc/SafetyChecker.cpp @@ -268,7 +268,7 @@ int SafetyChecker::backtrack() XBT_DEBUG("Back-tracking to state %d at depth %zi", state->num, stack_.size() + 1); stack_.push_back(std::move(state)); - simgrid::mc::replay(stack_); + simgrid::mc::restoreState(stack_); XBT_DEBUG("Back-tracking to state %d at depth %zi done", stack_.back()->num, stack_.size()); break; diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index 059a4878d9..52dd48ca85 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -119,7 +119,7 @@ namespace mc { * \param stack The stack with the transitions to execute. * \param start Start index to begin the re-execution. */ -void replay(std::list> const& stack) +void restoreState(std::list> const& stack) { XBT_DEBUG("**** Begin Replay ****"); diff --git a/src/mc/mc_state.h b/src/mc/mc_state.h index 2feff61fa7..d0a4159d54 100644 --- a/src/mc/mc_state.h +++ b/src/mc/mc_state.h @@ -144,7 +144,7 @@ struct XBT_PRIVATE State { Transition getTransition() const; }; -XBT_PRIVATE void replay(std::list> const& stack); +XBT_PRIVATE void restoreState(std::list> const& stack); } }