xo-gc: refactor: + GCObjectStore.verify_ok()
+ use in DX1Collector.verify_ok()
This commit is contained in:
parent
723ea7e3df
commit
e08b659a73
3 changed files with 57 additions and 40 deletions
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "GCObjectStoreConfig.hpp"
|
||||
#include "ObjectTypeSlot.hpp"
|
||||
//#include "Generation.hpp"
|
||||
#include "object_age.hpp"
|
||||
#include <xo/alloc2/role.hpp>
|
||||
#include <array>
|
||||
|
|
@ -15,6 +14,7 @@
|
|||
namespace xo {
|
||||
namespace mm {
|
||||
class DX1Collector;
|
||||
class X1VerifyStats;
|
||||
|
||||
/** @brief container to hold gc-aware objects for X1 collector
|
||||
**/
|
||||
|
|
@ -115,12 +115,28 @@ namespace xo {
|
|||
**/
|
||||
GCMoveCheckpoint snap_move_checkpoint(Generation upto);
|
||||
|
||||
/** verify consistency of this object store, on behalf of collector @p gc.
|
||||
* Advancing counters in @p *p_verify_stats.
|
||||
*
|
||||
* @p gc argument is load-bearing so we have collector interface
|
||||
* to call AGCObject visitor method (forward_children()) on each
|
||||
* object stored here.
|
||||
**/
|
||||
void verify_ok(DX1Collector * gc,
|
||||
X1VerifyStats * p_verify_stats) noexcept;
|
||||
|
||||
/** Register object type with this collector.
|
||||
* Provides shallow copy and pointer forwarding for instances of this
|
||||
* type.
|
||||
**/
|
||||
bool install_type(const AGCObject & meta) noexcept;
|
||||
|
||||
/** For each generation g in [0 ,.., upto)
|
||||
* swap arenas assigned to {to-space, from-space}.
|
||||
* Invoked once at the beginning of each gc cycle.
|
||||
**/
|
||||
void swap_roles(Generation upto) noexcept;
|
||||
|
||||
/** move subgraph at @p root to to-space on behalf of collector @p gc
|
||||
* Special behavior relative to @ref _deep_move_interior :
|
||||
* If @p root is not in gc-space, visit immediate children and move them in place (!).
|
||||
|
|
@ -131,12 +147,6 @@ namespace xo {
|
|||
obj<AGCObject> from_src,
|
||||
Generation upto);
|
||||
|
||||
/** For each generation g in [0 ,.., upto)
|
||||
* swap arenas assigned to {to-space, from-space}.
|
||||
* Invoked once at the beginning of each gc cycle.
|
||||
**/
|
||||
void swap_roles(Generation upto) noexcept;
|
||||
|
||||
/** move interior subgraph at @p from_src to to-space.
|
||||
* no-op if not in gc-space.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue