|
The Sparta Modeling Framework
|
Single delta checkpoint object containing all simulator state which changed since some previous DeltaCheckpoint. Can contain all simulator state if it has no previous DeltaCheckpoint. The previous delta can be referenced by getPrev(). More...
#include <DeltaCheckpoint.hpp>


Public Member Functions | |
| virtual std::string | stringize () const override |
| Returns a string describing this object. | |
| virtual void | dumpData (std::ostream &o) const override |
| Writes all checkpoint raw data to an ostream. | |
| void | dumpRestoreChain (std::ostream &o) const |
| Dumps the restore chain for this checkpoint. | |
| virtual uint64_t | getTotalMemoryUse () const noexcept override |
| Returns memory usage by this checkpoint. | |
| virtual uint64_t | getContentMemoryUse () const noexcept override |
| Returns memory usage by the content of this checkpoint. | |
Checkpoint Actions | |
| void | traceValue (std::ostream &o, const std::vector< ArchData * > &dats, const ArchData *container, uint32_t offset, uint32_t size) |
| Implement trace of a value across the restore chain as described in Checkpointer::traceValue. | |
| std::stack< DeltaCheckpoint * > | getHistoryChain () |
| Returns a stack of checkpoints from this checkpoint as far back as possible until no previous link is found. This is a superset of getRestoreChain and contains checkpoints that do not actually need to be inspected for restoring this checkpoint's data. This may reach the head checkpoint if no gaps are encountered. | |
| std::stack< DeltaCheckpoint * > | getRestoreChain () |
| Returns a stack of checkpoints that must be restored from top-to-bottom to fully restore the state associated with this checkpoint. | |
| std::stack< const DeltaCheckpoint * > | getRestoreChain () const |
| Const-qualified version of getRestoreChain. | |
| chkpt_id_t | getPrevID () const override |
| Get the ID of our previous checkpoint. Returns UNIDENTIFIED_CHECKPOINT if we have no previous checkpoint, as is the case with the head checkpoint and those flagged for deletion. | |
| std::vector< chkpt_id_t > | getNextIDs () const override |
| Returns next checkpoint following *this. May be an empty vector if there are no later checkpoints. | |
| virtual void | load (const std::vector< ArchData * > &dats) override |
| Attempts to restore this checkpoint including any previous deltas (dependencies). | |
| bool | canDelete () const noexcept |
| Can this checkpoint be deleted Cannot be deleted if: | |
| void | flagDeleted () |
| Allows this checkpoint to be deleted if it is no longer a previous delta of some other delta (i.e. getNexts() returns an empty vector). Sets the checkpoint ID to invalid. Calling multiple times has no effect. | |
| bool | isFlaggedDeleted () const noexcept |
| Indicates whether this checkpoint has been flagged deleted. | |
| chkpt_id_t | getDeletedID () const noexcept |
| Return the ID had by this checkpoint before it was deleted If this checkpoint has not been flagged for deletion, this will be UNIDENTIFIED_CHECKPOINT. | |
| virtual std::string | getDeletedRepr () const override |
| Gets the representation of this deleted checkpoint as part of a checkpoint chain (if that checkpointer supports deletion) | |
| bool | isSnapshot () const noexcept |
| Is this checkpoint a snapshot (contains ALL simulator state) | |
| uint32_t | getDistanceToPrevSnapshot () const noexcept |
| Determines how many checkpoints away the closest, earlier snapshot is. | |
Public Member Functions inherited from sparta::serialization::checkpoint::Checkpoint | |
| 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. | |
| 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. | |
| 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. | |
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. | |
| 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 | |
Protected Member Functions | |
| void | loadState (const std::vector< ArchData * > &dats) |
| Loads delta state of this checkpoint to root. Does not look at any other checkpoints checkpoints. | |
Protected Member Functions inherited from sparta::serialization::checkpoint::Checkpoint | |
| Checkpoint (chkpt_id_t id, tick_t tick, Checkpoint *prev) | |
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) | |
Construction & Initialization | |
| class | FastCheckpointer |
| DeltaCheckpoints can only be constructed by the FastCheckpointer. | |
| DeltaCheckpoint ()=delete | |
| Not default constructable. | |
| DeltaCheckpoint (const DeltaCheckpoint &)=delete | |
| Not copy constructable. | |
| const DeltaCheckpoint & | operator= (const DeltaCheckpoint &)=delete |
| Non-assignable. | |
| virtual | ~DeltaCheckpoint () |
| Destructor. | |
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. | |
Single delta checkpoint object containing all simulator state which changed since some previous DeltaCheckpoint. Can contain all simulator state if it has no previous DeltaCheckpoint. The previous delta can be referenced by getPrev().
Allows timeline branching by having one DeltaCheckpoint be the previous checkpoint of multiple other checkpoints.
Once this checkpoint becomes another's previous checkpoint, that checkpoint can be referenced (among the rest) through getNextDeltas().
Intended to be constructed and manipulated only by a FastCheckpointer instance.
Definition at line 43 of file DeltaCheckpoint.hpp.
|
inlinevirtual |
Destructor.
Prints a warning if checkpoint was not allowed to be deleted
Definition at line 129 of file DeltaCheckpoint.hpp.

|
inlinenoexcept |
Can this checkpoint be deleted Cannot be deleted if:
Definition at line 406 of file DeltaCheckpoint.hpp.

|
inlineoverridevirtual |
Writes all checkpoint raw data to an ostream.
| o | ostream to which raw data will be written |
Implements sparta::serialization::checkpoint::CheckpointBase.
Definition at line 164 of file DeltaCheckpoint.hpp.
|
inline |
Dumps the restore chain for this checkpoint.
| o | ostream to which chain data will be dumped |
Definition at line 173 of file DeltaCheckpoint.hpp.

|
inline |
Allows this checkpoint to be deleted if it is no longer a previous delta of some other delta (i.e. getNexts() returns an empty vector). Sets the checkpoint ID to invalid. Calling multiple times has no effect.
Definition at line 430 of file DeltaCheckpoint.hpp.

|
inlineoverridevirtualnoexcept |
Returns memory usage by the content of this checkpoint.
Implements sparta::serialization::checkpoint::CheckpointBase.
Definition at line 209 of file DeltaCheckpoint.hpp.
|
inlinenoexcept |
Return the ID had by this checkpoint before it was deleted If this checkpoint has not been flagged for deletion, this will be UNIDENTIFIED_CHECKPOINT.
Definition at line 453 of file DeltaCheckpoint.hpp.
|
inlineoverridevirtual |
Gets the representation of this deleted checkpoint as part of a checkpoint chain (if that checkpointer supports deletion)
Reimplemented from sparta::serialization::checkpoint::CheckpointBase.
Definition at line 463 of file DeltaCheckpoint.hpp.

|
inlinenoexcept |
Determines how many checkpoints away the closest, earlier snapshot is.
Definition at line 488 of file DeltaCheckpoint.hpp.

|
inline |
Returns a stack of checkpoints from this checkpoint as far back as possible until no previous link is found. This is a superset of getRestoreChain and contains checkpoints that do not actually need to be inspected for restoring this checkpoint's data. This may reach the head checkpoint if no gaps are encountered.
Definition at line 303 of file DeltaCheckpoint.hpp.

|
inlineoverridevirtual |
Returns next checkpoint following *this. May be an empty vector if there are no later checkpoints.
Reimplemented from sparta::serialization::checkpoint::Checkpoint.
Definition at line 368 of file DeltaCheckpoint.hpp.

|
inlineoverridevirtual |
Get the ID of our previous checkpoint. Returns UNIDENTIFIED_CHECKPOINT if we have no previous checkpoint, as is the case with the head checkpoint and those flagged for deletion.
Reimplemented from sparta::serialization::checkpoint::Checkpoint.
Definition at line 355 of file DeltaCheckpoint.hpp.

|
inline |
Returns a stack of checkpoints that must be restored from top-to-bottom to fully restore the state associated with this checkpoint.
Definition at line 319 of file DeltaCheckpoint.hpp.

|
inline |
Const-qualified version of getRestoreChain.
Definition at line 336 of file DeltaCheckpoint.hpp.

|
inlineoverridevirtualnoexcept |
Returns memory usage by this checkpoint.
Implements sparta::serialization::checkpoint::CheckpointBase.
Definition at line 200 of file DeltaCheckpoint.hpp.

|
inlinenoexcept |
Indicates whether this checkpoint has been flagged deleted.
Definition at line 444 of file DeltaCheckpoint.hpp.

|
inlinenoexcept |
Is this checkpoint a snapshot (contains ALL simulator state)
Definition at line 476 of file DeltaCheckpoint.hpp.
|
inlineoverridevirtual |
Attempts to restore this checkpoint including any previous deltas (dependencies).
Uses loadState to restore state from each checkpoint in the restore chain.
Implements sparta::serialization::checkpoint::CheckpointBase.
Definition at line 386 of file DeltaCheckpoint.hpp.

|
inlineprotected |
Loads delta state of this checkpoint to root. Does not look at any other checkpoints checkpoints.
Definition at line 541 of file DeltaCheckpoint.hpp.

|
inlineoverridevirtual |
Returns a string describing this object.
Reimplemented from sparta::serialization::checkpoint::CheckpointBase.
Definition at line 142 of file DeltaCheckpoint.hpp.

|
inline |
Implement trace of a value across the restore chain as described in Checkpointer::traceValue.
Definition at line 220 of file DeltaCheckpoint.hpp.

|
friend |
DeltaCheckpoints can only be constructed by the FastCheckpointer.
Definition at line 118 of file DeltaCheckpoint.hpp.