|
The Sparta Modeling Framework
|
Checkpoint class optimized for use with database-backed checkpointers. More...
#include <DatabaseCheckpoint.hpp>


Public Member Functions | |
| template<typename Archive > | |
| void | serialize (Archive &ar, const unsigned int version) |
| std::string | stringize () const override |
| Returns a string describing this object. | |
| void | dumpData (std::ostream &o) const override |
| Writes all checkpoint raw data to an ostream. | |
| uint64_t | getTotalMemoryUse () const noexcept override |
| Returns memory usage by this checkpoint. | |
| uint64_t | getContentMemoryUse () const noexcept override |
| Returns memory usage by the content of this checkpoint. | |
| std::stack< chkpt_id_t > | getHistoryChain () const |
| Returns a stack of checkpoints from this checkpoint as far back as possible until no previous link is found. | |
| std::stack< chkpt_id_t > | getRestoreChain () const |
| Returns a stack of checkpoints that must be restored from top-to-bottom to fully restore the state associated with this checkpoint. | |
| chkpt_id_t | getPrevID () const override |
| Get the ID of our previous checkpoint. Returns UNIDENTIFIED_CHECKPOINT only for the head checkpoint. | |
| std::vector< chkpt_id_t > | getNextIDs () const override |
| Returns next checkpoints following this one. May be an empty vector if there are no later checkpoints. | |
| void | load (const std::vector< ArchData * > &dats) override |
| Attempts to restore this checkpoint including any previous deltas (dependencies). | |
| bool | isSnapshot () const noexcept |
| Is this checkpoint a snapshot? If true, this checkpoint has no dependencies and contains all simulator state. | |
| uint32_t | getDistanceToPrevSnapshot () const noexcept |
| Determines how many checkpoints away the closest, earlier snapshot is. | |
| void | loadState (const std::vector< ArchData * > &dats) |
| Loads delta state of this checkpoint to root. | |
Public Member Functions inherited from sparta::serialization::checkpoint::CheckpointBase | |
| 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 | |
Friends | |
| struct | ChkptWindow |
| class | DatabaseCheckpointer |
Construction & Initialization | |
| DatabaseCheckpoint (const DatabaseCheckpoint &)=delete | |
| Not copy constructable. | |
| DatabaseCheckpoint & | operator= (const DatabaseCheckpoint &)=delete |
| Non-assignable. | |
| DatabaseCheckpoint (DatabaseCheckpoint &&)=delete | |
| Not move constructable. | |
| DatabaseCheckpoint & | operator= (DatabaseCheckpoint &&)=delete |
| Not move assignable. | |
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) | |
Checkpoint class optimized for use with database-backed checkpointers.
Definition at line 52 of file DatabaseCheckpoint.hpp.
|
overridevirtual |
Writes all checkpoint raw data to an ostream.
| o | ostream to which raw data will be written. |
Implements sparta::serialization::checkpoint::CheckpointBase.
|
overridevirtualnoexcept |
Returns memory usage by the content of this checkpoint.
Implements sparta::serialization::checkpoint::CheckpointBase.
|
noexcept |
Determines how many checkpoints away the closest, earlier snapshot is.
| std::stack< chkpt_id_t > sparta::serialization::checkpoint::DatabaseCheckpoint::getHistoryChain | ( | ) | const |
Returns a stack of checkpoints from this checkpoint as far back as possible until no previous link is found.
|
overridevirtual |
Returns next checkpoints following this one. May be an empty vector if there are no later checkpoints.
Implements sparta::serialization::checkpoint::CheckpointBase.
|
overridevirtual |
Get the ID of our previous checkpoint. Returns UNIDENTIFIED_CHECKPOINT only for the head checkpoint.
Implements sparta::serialization::checkpoint::CheckpointBase.
|
overridevirtualnoexcept |
Returns memory usage by this checkpoint.
Implements sparta::serialization::checkpoint::CheckpointBase.
|
overridevirtual |
Attempts to restore this checkpoint including any previous deltas (dependencies).
Implements sparta::serialization::checkpoint::CheckpointBase.
| void sparta::serialization::checkpoint::DatabaseCheckpoint::loadState | ( | const std::vector< ArchData * > & | dats | ) |
Loads delta state of this checkpoint to root.
|
inline |
Definition at line 97 of file DatabaseCheckpoint.hpp.
|
overridevirtual |
Returns a string describing this object.
Reimplemented from sparta::serialization::checkpoint::CheckpointBase.
|
friend |
Definition at line 88 of file DatabaseCheckpoint.hpp.
|
friend |
Definition at line 89 of file DatabaseCheckpoint.hpp.