xo-gc: refactor for MutationLogStore bugs [TESTFAIL]
This commit is contained in:
parent
daf7d027be
commit
f79c8a9c73
5 changed files with 154 additions and 19 deletions
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
namespace xo {
|
||||
namespace mm {
|
||||
class GCObjectStore; // see xo-gc/ GCObjectStore.hpp
|
||||
|
||||
/** @brief Track a cross-generational pointer
|
||||
*
|
||||
|
|
@ -40,6 +41,15 @@ namespace xo {
|
|||
/** true iff child pointer has been altered since this mlog entry created **/
|
||||
bool is_superseded() const noexcept { return *p_data_ != snap_.data(); }
|
||||
|
||||
/** Refresh snapshot when *p_data_ does not match snap_.data_
|
||||
* Get updated facet information from destination alloc header.
|
||||
* It's possible that *p_data_ no longer points to gc-owned space
|
||||
*
|
||||
* @return true if snapshot updated. false if this entry should be discarded
|
||||
**/
|
||||
bool refresh_snapshot(Generation parent_gen,
|
||||
GCObjectStore * gcos) noexcept;
|
||||
|
||||
private:
|
||||
/** address of object containing logged mutation **/
|
||||
void * parent_ = nullptr;
|
||||
|
|
|
|||
|
|
@ -139,18 +139,19 @@ namespace xo {
|
|||
MutationLogStatistics _preserve_child_of_live_parent(obj<AGCObjectVisitor> gc,
|
||||
Generation upto,
|
||||
Generation parent_gen,
|
||||
const MutationLogEntry & from_entry,
|
||||
MutationLogEntry & from_entry,
|
||||
MutationLog * keep_mlog);
|
||||
|
||||
#ifdef OBSOLETE
|
||||
/** On behalf of collector @p gc:
|
||||
*
|
||||
* helper function to decide whether to keep a mutation log entry
|
||||
* @return true iff mlog entry appended to @p keep_mlog
|
||||
**/
|
||||
bool _check_keep_mutation_aux(const MutationLogEntry & from_entry,
|
||||
void _check_keep_mutation_aux(MutationLogEntry & from_entry,
|
||||
Generation parent_gen_to,
|
||||
void * child_to,
|
||||
MutationLog * keep_mlog);
|
||||
#endif
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue