Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/4741

Change subject: alpha: Move some initialization logic from loadState into unserialize.
......................................................................

alpha: Move some initialization logic from loadState into unserialize.

The primary difference between loadState and unserialize, at least when
eventually using the default SimObject implementation of loadState, is that
unserialize is called only if there's a corresponding section in the
checkpoint being restored. In this particular case, the AlphaProcess class
calls the generic Process unserialize function, and that does other critical
initialization like set up the processes page table. If the unserialize
function isn't called, other serious problems would break the simulation
anyway.

This removes the final custom implementation of loadState.

Change-Id: If50062392196bd37efd5ba04fd7aee6907b00dc6
---
M src/arch/alpha/process.cc
M src/arch/alpha/process.hh
2 files changed, 3 insertions(+), 3 deletions(-)



diff --git a/src/arch/alpha/process.cc b/src/arch/alpha/process.cc
index 9be1d6c..2a5c9f6 100644
--- a/src/arch/alpha/process.cc
+++ b/src/arch/alpha/process.cc
@@ -189,9 +189,9 @@


 void
-AlphaProcess::loadState(CheckpointIn &cp)
+AlphaProcess::unserialize(CheckpointIn &cp)
 {
-    Process::loadState(cp);
+    Process::unserialize(cp);
     // need to set up ASN after unserialization since _pid value may
     // come from checkpoint
     setupASNReg();
diff --git a/src/arch/alpha/process.hh b/src/arch/alpha/process.hh
index 5851c86..a02b8ce 100644
--- a/src/arch/alpha/process.hh
+++ b/src/arch/alpha/process.hh
@@ -43,7 +43,7 @@
   protected:
     AlphaProcess(ProcessParams *params, ObjectFile *objFile);

-    void loadState(CheckpointIn &cp) override;
+    void unserialize(CheckpointIn &cp) override;
     void initState() override;

     void argsInit(int intSize, int pageSize);

--
To view, visit https://gem5-review.googlesource.com/4741
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If50062392196bd37efd5ba04fd7aee6907b00dc6
Gerrit-Change-Number: 4741
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to