|
The Sparta Modeling Framework
|
Single checkpoint object interface with a tick number and an ID unique to the owning Checkpointer instance. More...
#include <Checkpoint.hpp>


Public Member Functions | |
| Checkpoint * | getPrev () const noexcept |
| Returns the previous checkpoint. If this checkpoint is a snapshot, it has no previous checkpoint. | |
| void | setPrev (Checkpoint *prev) noexcept |
| Sets the previous checkpoint of this checkpoint to prev. | |
| chkpt_id_t | getPrevID () const override |
| Get the ID of our previous checkpoint. Returns UNIDENTIFIED_CHECKPOINT only for the head checkpoint. | |
| void | addNext (Checkpoint *next) |
| Adds another next checkpoint following *this. | |
| void | removeNext (Checkpoint *next) |
| Removes a checkpoint following *this because it was deleted. | |
| const std::vector< Checkpoint * > & | getNexts () const noexcept |
| Returns next checkpoint following *this. May be an empty vector if there are no later checkpoints following this Checkpoint. | |
| std::vector< chkpt_id_t > | getNextIDs () const override |
| Returns next checkpoint following *this. May be an empty vector if there are no later checkpoints. | |
Public Member Functions inherited from sparta::serialization::checkpoint::CheckpointBase | |
| virtual void | load (const std::vector< ArchData * > &dats)=0 |
| Attempts to restore this checkpoint state to the simulation state (ArchData) objects given to this Checkpoint at construction. | |
| tick_t | getTick () const noexcept |
| Returns the tick number at which this checkpoint was taken. | |
| chkpt_id_t | getID () const noexcept |
| Returns the ID of this checkpoint. | |
| virtual std::string | getDeletedRepr () const |
| Gets the representation of this deleted checkpoint as part of a checkpoint chain (if that checkpointer supports deletion) | |
| CheckpointBase (const CheckpointBase &)=delete | |
| Not copy constructable. | |
| CheckpointBase & | operator= (const CheckpointBase &)=delete |
| Non-assignable. | |
| CheckpointBase (CheckpointBase &&)=delete | |
| Not move constructable. | |
| CheckpointBase & | operator= (CheckpointBase &&)=delete |
| Not move assignable. | |
| virtual | ~CheckpointBase ()=default |
| Destructor. | |
| template<typename Archive > | |
| void | serialize (Archive &ar, const unsigned int) |
| boost::serialization support | |
| virtual std::string | stringize () const |
| Returns a string describing this object. | |
| virtual void | dumpData (std::ostream &o) const =0 |
| Writes all checkpoint raw data to an ostream. | |
| virtual uint64_t | getTotalMemoryUse () const noexcept=0 |
| Returns memory usage by this checkpoint including any framework data structures. | |
| virtual uint64_t | getContentMemoryUse () const noexcept=0 |
| Returns memory usage by this checkpoint solely for the checkpointed content. | |
Construction & Initialization | |
| Checkpoint ()=delete | |
| Not default constructable. | |
| Checkpoint (const Checkpoint &)=delete | |
| Not copy constructable. | |
| Checkpoint & | operator= (const Checkpoint &)=delete |
| Non-assignable. | |
| Checkpoint (Checkpoint &&)=delete | |
| Not move constructable. | |
| Checkpoint & | operator= (Checkpoint &&)=delete |
| Not move assignable. | |
| virtual | ~Checkpoint () |
| Removes this checkpoint from the chain and patches chain between prev and each item in the nexts list. | |
| Checkpoint (chkpt_id_t id, tick_t tick, Checkpoint *prev) | |
Additional Inherited Members | |
Public Types inherited from sparta::serialization::checkpoint::CheckpointBase | |
| typedef sparta::Scheduler::Tick | tick_t |
| tick_t Tick type to which checkpoints will refer | |
| typedef uint64_t | chkpt_id_t |
| tick_t Checkpoint ID type to which checkpoints will refer | |
Static Public Attributes inherited from sparta::serialization::checkpoint::CheckpointBase | |
| static const chkpt_id_t | MIN_CHECKPOINT = 0 |
| Indicates the smallest valid checkpoint id. | |
| static const chkpt_id_t | UNIDENTIFIED_CHECKPOINT = ~(chkpt_id_t)0 |
| Indicates unidentified checkpoint (could mean 'invalid' or 'any') depending on context. | |
Protected Member Functions inherited from sparta::serialization::checkpoint::CheckpointBase | |
| void | setID_ (chkpt_id_t id) |
| Sets the checkpoint ID. | |
| CheckpointBase (chkpt_id_t id, tick_t tick) | |
Single checkpoint object interface with a tick number and an ID unique to the owning Checkpointer instance.
A subclass of Checkpointer is expected to hold or refer to some checkpoint data in memory or on disk at construction which can be restored with load()
Definition at line 17 of file Checkpoint.hpp.
|
inlineprotected |
Definition at line 45 of file Checkpoint.hpp.
|
inlinevirtual |
Removes this checkpoint from the chain and patches chain between prev and each item in the nexts list.
Definition at line 58 of file Checkpoint.hpp.

|
inline |
Adds another next checkpoint following *this.
| next | Next checkpoint (later in simulator ticks) than *this. Cannot be nullptr. Must contain (at a minimum) all state which changed since *this checkpoint was taken. next->getPrev() must be this checkpoint and next->getTick() must be >= this->getTick() |
| CheckpointError | if next argument is nullptr or already in next checkpoints list or if next->getTick() < this->getTick() |
Definition at line 110 of file Checkpoint.hpp.

|
inlineoverridevirtual |
Returns next checkpoint following *this. May be an empty vector if there are no later checkpoints.
Implements sparta::serialization::checkpoint::CheckpointBase.
Reimplemented in sparta::serialization::checkpoint::DeltaCheckpoint< StorageT >.
Definition at line 162 of file Checkpoint.hpp.

|
inlinenoexcept |
Returns next checkpoint following *this. May be an empty vector if there are no later checkpoints following this Checkpoint.
Returning an empty vector implies that there are no checkpoints descended from this
Definition at line 156 of file Checkpoint.hpp.
|
inlinenoexcept |
Returns the previous checkpoint. If this checkpoint is a snapshot, it has no previous checkpoint.
Definition at line 79 of file Checkpoint.hpp.
|
inlineoverridevirtual |
Get the ID of our previous checkpoint. Returns UNIDENTIFIED_CHECKPOINT only for the head checkpoint.
Implements sparta::serialization::checkpoint::CheckpointBase.
Reimplemented in sparta::serialization::checkpoint::DeltaCheckpoint< StorageT >.
Definition at line 97 of file Checkpoint.hpp.

|
inline |
Removes a checkpoint following *this because it was deleted.
| next | Next checkpoint to remove. Must be found in this object's nexts list. next->getPrev() must be this. Must not be nullptr. |
Definition at line 135 of file Checkpoint.hpp.

|
inlinenoexcept |
Sets the previous checkpoint of this checkpoint to prev.
| prev | New previous checkpoint. Overwrites previous This will often be accompanied by a call to addNext on the prev argument |
Definition at line 89 of file Checkpoint.hpp.