changeset 1a9e235cab09 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=1a9e235cab09
description:
config: Fix checkpoint restore in C++ config example
This patch fixes the checkpoint restore option in the example of C++
configuration (util/cxx_config).
The fix introduces a call to config_manager->startup() (which calls
startup
on all SimObjects managed by that manager) to replicate the loop of
SimObject::startup calls in src/python/m5/simulate.py::simulate guarded
by
need_startup. As util/cxx_config/main.cc is a C++ analogue of
src/python/mt/simulate.py, it should make a similar set of calls.
diffstat:
util/cxx_config/main.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 47fe87b0cf97 -r 1a9e235cab09 util/cxx_config/main.cc
--- a/util/cxx_config/main.cc Fri Nov 14 03:53:51 2014 -0500
+++ b/util/cxx_config/main.cc Fri Nov 14 03:54:02 2014 -0500
@@ -88,7 +88,7 @@
" -s <dir> <ticks> -- save checkpoint to dir after"
" the given\n"
" number of ticks\n"
- " -r <dir> -- restore checkpoint to dir\n"
+ " -r <dir> -- restore checkpoint from dir\n"
" -c <from> <to> <ticks> -- switch from cpu 'from' to cpu"
" 'to' after\n"
" the given number of ticks\n"
@@ -226,7 +226,6 @@
GlobalSimLoopExitEvent *exit_event = NULL;
if (checkpoint_save) {
-
exit_event = simulate(pre_run_time);
DrainManager drain_manager;
@@ -265,6 +264,7 @@
Serializable::unserializeGlobals(checkpoint);
config_manager->loadState(checkpoint);
+ config_manager->startup();
config_manager->drainResume();
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev