|
| | CherryPickFastCheckpointer (simdb::DatabaseManager *db_mgr, const std::vector< TreeNode * > &roots, Scheduler *sched=nullptr) |
| | CherryPickFastCheckpointer constructor.
|
| |
|
void | createPipeline (simdb::pipeline::PipelineManager *pipeline_mgr) override |
| | Instantiate the async processing pipeline to save checkpoints to the DB.
|
| |
| FastCheckpointer & | getFastCheckpointer () noexcept |
| | Use the FastCheckpointer to create checkpoints / checkpoint branches.
|
| |
| void | commitCurrentBranch (bool force_new_head_chkpt=false) |
| | When satisfied with the outstanding/uncommitted checkpoints, call this method to commit them to the database.
|
| |
|
void | saveCheckpoints (checkpoint_ptrs &&checkpoints) |
| | Send the committed checkpoints down the pipeline to the database.
|
| |
| size_t | getNumCheckpoints () const |
| | Get the total number of checkpoints sent to the database thus far.
|
| |
|
std::string | stringize () const |
| | Returns a string describing this object.
|
| |
|
|
static void | defineSchema (simdb::Schema &schema) |
| | Define the SimDB schema for this checkpointer.
|
| |
|
| static constexpr auto | NAME = "cherry-pick-fast-checkpointer" |
| |
◆ arch_id_t
| using sparta::serialization::checkpoint::CherryPickFastCheckpointer::arch_id_t = uint64_t |
◆ checkpoint_ptr
| using sparta::serialization::checkpoint::CherryPickFastCheckpointer::checkpoint_ptr = typename FastCheckpointer::checkpoint_ptr |
◆ checkpoint_ptrs
| using sparta::serialization::checkpoint::CherryPickFastCheckpointer::checkpoint_ptrs = typename FastCheckpointer::checkpoint_ptrs |
◆ checkpoint_type
◆ chkpt_id_t
◆ tick_t
| using sparta::serialization::checkpoint::CherryPickFastCheckpointer::tick_t = typename Checkpointer::tick_t |
◆ CherryPickFastCheckpointer()
| sparta::serialization::checkpoint::CherryPickFastCheckpointer::CherryPickFastCheckpointer |
( |
simdb::DatabaseManager * | db_mgr, |
|
|
const std::vector< TreeNode * > & | roots, |
|
|
Scheduler * | sched = nullptr ) |
CherryPickFastCheckpointer constructor.
- Parameters
-
| db_mgr | SimDB instance to use as a backing store for all checkpoints. |
| roots | TreeNodes at which checkpoints will be taken. These cannot be changed later. These do not necessarily need to be RootTreeNodes. Before the first checkpoint is taken, these nodes must be finalized (see sparta::TreeNode::isFinalized). At the point of construction, the nodes do not need to be finalized. |
| sched | Scheduler to read and restart on checkpoint restore (if not nullptr) |
◆ commitCurrentBranch()
| void sparta::serialization::checkpoint::CherryPickFastCheckpointer::commitCurrentBranch |
( |
bool | force_new_head_chkpt = false | ) |
|
When satisfied with the outstanding/uncommitted checkpoints, call this method to commit them to the database.
- Parameters
-
| force_new_head_chkpt | If false, then this checkpoint chain: S1 -> D1 -> D2 -> D3 -> S2 -> D4 -> D5 (current) Would result in this being saved to disk: S1 -> D1 -> D2 -> D3 While the S2 checkpoint becomes the new head checkpoint in memory, and D4/D5 are retained in the FastCheckpointer. |
If true, then everything from S1 to D5 will be saved to disk, and a new head checkpoint S3 will be created in memory at the current tick.
◆ getFastCheckpointer()
| FastCheckpointer & sparta::serialization::checkpoint::CherryPickFastCheckpointer::getFastCheckpointer |
( |
| ) |
|
|
inlinenoexcept |
◆ getNumCheckpoints()
| size_t sparta::serialization::checkpoint::CherryPickFastCheckpointer::getNumCheckpoints |
( |
| ) |
const |
Get the total number of checkpoints sent to the database thus far.
- Note
- Do not call this in the critical path, as it will flush the whole pipeline before querying the database.
◆ NAME
| auto sparta::serialization::checkpoint::CherryPickFastCheckpointer::NAME = "cherry-pick-fast-checkpointer" |
|
staticconstexpr |
The documentation for this class was generated from the following file: