gem5
|
#include <atomic>
#include <mutex>
#include <vector>
Go to the source code of this file.
Classes | |
class | DrainManager |
This class coordinates draining of a System. More... | |
class | Drainable |
Interface for objects that might require draining before checkpointing. More... | |
Enumerations | |
enum | DrainState { DrainState::Running, DrainState::Draining, DrainState::Drained, DrainState::Resuming } |
Object drain/handover states. More... | |
|
strong |
Object drain/handover states.
An object starts out in the Running state. When the simulator prepares to take a snapshot or prepares a CPU for handover, it calls the drain() method to transfer the object into the Draining or Drained state. If any object enters the Draining state (Drainable::drain() returning >0), simulation continues until it all objects have entered the Drained state.
Before resuming simulation, the simulator calls resume() to transfer the object to the Running state. This in turn results in a call to drainResume() for all Drainable objects in the simulator. New Drainable objects may be created while resuming. In such cases, the new objects will be created in the Resuming state and later resumed.
Enumerator | |
---|---|
Running | |
Draining |
Running normally. |
Drained |
Draining buffers pending serialization/handover. |
Resuming |
Buffers drained, ready for serialization/handover. |