diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-09-01 15:28:45 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-09-01 15:28:45 +0100 |
commit | 05852e698adf7bbf1a9512e27f76d7a7b6f0e0e2 (patch) | |
tree | 786c0167858bf95eb7356dfdd6650ed3d6a1b76b /src/sim/eventq.cc | |
parent | 53001e6e09d31063784c408f0f35caad45afeef1 (diff) | |
download | gem5-05852e698adf7bbf1a9512e27f76d7a7b6f0e0e2.tar.xz |
sim: Remove broken AutoSerialize support from the event queue
Event auto-serialization no longer in use and has been broken ever
since the introduction of PDES support almost two years
ago. Additionally, serializing the individual event queues is
undesirable since it exposes the thread structure of the
simulator. What this means in practice is that the number of threads
in the simulator must be the same when taking a checkpoint and when
loading the checkpoint.
This changeset removes support for the AutoSerialize event flag and
the associated serialization code.
Diffstat (limited to 'src/sim/eventq.cc')
-rw-r--r-- | src/sim/eventq.cc | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/sim/eventq.cc b/src/sim/eventq.cc index 48664f8e8..604de4a71 100644 --- a/src/sim/eventq.cc +++ b/src/sim/eventq.cc @@ -283,55 +283,6 @@ Event::unserialize(CheckpointIn &cp) } void -EventQueue::serialize(CheckpointOut &cp) const -{ - std::list<Event *> eventPtrs; - - int numEvents = 0; - Event *nextBin = head; - while (nextBin) { - Event *nextInBin = nextBin; - - while (nextInBin) { - if (nextInBin->flags.isSet(Event::AutoSerialize)) { - eventPtrs.push_back(nextInBin); - paramOut(cp, csprintf("event%d", numEvents++), - nextInBin->name()); - } - nextInBin = nextInBin->nextInBin; - } - - nextBin = nextBin->nextBin; - } - - SERIALIZE_SCALAR(numEvents); - - for (Event *ev : eventPtrs) - ev->serializeSection(cp, ev->name()); -} - -void -EventQueue::unserialize(CheckpointIn &cp) -{ - int numEvents; - UNSERIALIZE_SCALAR(numEvents); - - std::string eventName; - for (int i = 0; i < numEvents; i++) { - // get the pointer value associated with the event - paramIn(cp, csprintf("event%d", i), eventName); - - // create the event based on its pointer value - Serializable *obj(Serializable::create(cp, eventName)); - Event *event(dynamic_cast<Event *>(obj)); - fatal_if(!event, - "Event queue unserialized something that wasn't an event.\n"); - - checkpointReschedule(event); - } -} - -void EventQueue::checkpointReschedule(Event *event) { // It's safe to call insert() directly here since this method |