gem5: restore works now
The function restore(PATH) can now be used to restore a checkpoint. Change-Id: I25faf9f6335261d2b3ade4185eae93983ece9f97
This commit is contained in:
@ -512,6 +512,13 @@ Serializable::unserializeGlobals(Checkpoint *cp)
|
||||
globals.unserialize(cp, globals.name());
|
||||
}
|
||||
|
||||
//DanceOS
|
||||
void
|
||||
Serializable::loadStateAll(Checkpoint *cp)
|
||||
{
|
||||
SimObject::loadStateAll(cp);
|
||||
}
|
||||
|
||||
void
|
||||
debug_serialize(const string &cpt_dir)
|
||||
{
|
||||
|
||||
@ -170,6 +170,7 @@ class Serializable
|
||||
static int ckptPrevCount;
|
||||
static void serializeAll(const std::string &cpt_dir);
|
||||
static void unserializeGlobals(Checkpoint *cp);
|
||||
static void loadStateAll(Checkpoint *cp); //DanceOS
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
@ -130,6 +130,21 @@ SimObject::serializeAll(ostream &os)
|
||||
}
|
||||
}
|
||||
|
||||
//DanceOS
|
||||
// static function: loadState all SimObjects.
|
||||
//
|
||||
void
|
||||
SimObject::loadStateAll(Checkpoint *cp)
|
||||
{
|
||||
SimObjectList::iterator ri = simObjectList.begin();
|
||||
SimObjectList::iterator rend = simObjectList.end();
|
||||
|
||||
for (; ri != rend; ++ri) {
|
||||
SimObject *obj = *ri;
|
||||
obj->loadState(cp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
//
|
||||
|
||||
@ -139,6 +139,7 @@ class SimObject : public EventManager, public Serializable
|
||||
|
||||
// static: call nameOut() & serialize() on all SimObjects
|
||||
static void serializeAll(std::ostream &);
|
||||
static void loadStateAll(Checkpoint *cp); //DanceOS
|
||||
|
||||
// Methods to drain objects in order to take checkpoints
|
||||
// Or switch from timing -> atomic memory model
|
||||
|
||||
Reference in New Issue
Block a user