From: Martin Quinson Date: Thu, 4 Aug 2022 19:18:33 +0000 (+0200) Subject: Kill another mc::api function X-Git-Tag: v3.32~92 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/88cc566ccd245ab2ec3af71bb983f74930bbb67d Kill another mc::api function --- diff --git a/src/mc/api.cpp b/src/mc/api.cpp index b88595790d..ec477c9841 100644 --- a/src/mc/api.cpp +++ b/src/mc/api.cpp @@ -81,11 +81,6 @@ std::size_t Api::get_remote_heap_bytes() const return heap_bytes_used; } -void Api::restore_state(const simgrid::mc::Snapshot* system_state) const -{ - system_state->restore(&mc_model_checker->get_remote_process()); -} - bool Api::snapshot_equal(const Snapshot* s1, const Snapshot* s2) const { return simgrid::mc::snapshot_equal(s1, s2); diff --git a/src/mc/api.hpp b/src/mc/api.hpp index 2a667f7de1..14ad74a941 100644 --- a/src/mc/api.hpp +++ b/src/mc/api.hpp @@ -59,9 +59,6 @@ public: // REMOTE APIs std::size_t get_remote_heap_bytes() const; - // STATE APIs - void restore_state(const Snapshot* system_state) const; - // SNAPSHOT APIs bool snapshot_equal(const Snapshot* s1, const Snapshot* s2) const; simgrid::mc::Snapshot* take_snapshot(long num_state) const; diff --git a/src/mc/explo/DFSExplorer.cpp b/src/mc/explo/DFSExplorer.cpp index edd9eee4be..7c55d22092 100644 --- a/src/mc/explo/DFSExplorer.cpp +++ b/src/mc/explo/DFSExplorer.cpp @@ -246,7 +246,7 @@ void DFSExplorer::restore_state() /* If asked to rollback on a state that has a snapshot, restore it */ State* last_state = stack_.back().get(); if (const auto* system_state = last_state->get_system_state()) { - Api::get().restore_state(system_state); + system_state->restore(&get_remote_app().get_remote_process()); on_restore_system_state_signal(last_state, get_remote_app()); return; } diff --git a/src/mc/explo/LivenessChecker.cpp b/src/mc/explo/LivenessChecker.cpp index 297fd0ae4b..8078fb4d0a 100644 --- a/src/mc/explo/LivenessChecker.cpp +++ b/src/mc/explo/LivenessChecker.cpp @@ -101,7 +101,7 @@ void LivenessChecker::replay() if (_sg_mc_checkpoint > 0) { const Pair* pair = exploration_stack_.back().get(); if (const auto* system_state = pair->app_state_->get_system_state()) { - Api::get().restore_state(system_state); + system_state->restore(&get_remote_app().get_remote_process()); return; } }