diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-10-25 20:13:35 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-10-25 20:13:35 -0400 |
commit | 0711f4f17a4b4ac61b07cbe742f0d193f919ea8f (patch) | |
tree | 6fdd5b340696c7506dc85f4eb8cb39421da3ccaa /src/sim | |
parent | b0e3aab5df9328ddfd13e396456cebdcaf0c8912 (diff) | |
download | gem5-0711f4f17a4b4ac61b07cbe742f0d193f919ea8f.tar.xz |
SE: Fix page table and system serialization, don't reinit process if this is a checkpoint restore.
--HG--
extra : convert_revision : 03dcf3c088e57b7abab60efe700d947117888306
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/process.cc | 6 | ||||
-rw-r--r-- | src/sim/process.hh | 2 | ||||
-rw-r--r-- | src/sim/system.cc | 8 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc index c5be4087d..01155ae32 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -85,7 +85,7 @@ using namespace TheISA; int num_processes = 0; Process::Process(ProcessParams * params) - : SimObject(params), system(params->system), + : SimObject(params), system(params->system), checkpointRestored(false), max_stack_size(params->max_stack_size) { string in = params->input; @@ -335,6 +335,10 @@ Process::unserialize(Checkpoint *cp, const std::string §ion) UNSERIALIZE_ARRAY(fd_map, MAX_FD); pTable->unserialize(cp, section); + + + checkpointRestored = true; + } diff --git a/src/sim/process.hh b/src/sim/process.hh index d43208c27..0d2db959c 100644 --- a/src/sim/process.hh +++ b/src/sim/process.hh @@ -74,6 +74,8 @@ class Process : public SimObject // created threads and are not initialized. bool initialContextLoaded; + bool checkpointRestored; + // thread contexts associated with this process std::vector<ThreadContext *> threadContexts; diff --git a/src/sim/system.cc b/src/sim/system.cc index 41c1b94e3..7dc1d2ba9 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -240,7 +240,9 @@ System::serialize(ostream &os) { #if FULL_SYSTEM kernelSymtab->serialize("kernel_symtab", os); -#endif // FULL_SYSTEM +#else // !FULL_SYSTEM + SERIALIZE_SCALAR(page_ptr); +#endif } @@ -249,7 +251,9 @@ System::unserialize(Checkpoint *cp, const string §ion) { #if FULL_SYSTEM kernelSymtab->unserialize("kernel_symtab", cp, section); -#endif // FULL_SYSTEM +#else // !FULL_SYSTEM + UNSERIALIZE_SCALAR(page_ptr); +#endif } void |