xo-gc: refactor, focus on DX1Collector+MutationLogState

This commit is contained in:
Roland Conybeare 2026-04-02 21:23:46 -04:00
commit ae9e97acc2
12 changed files with 140 additions and 57 deletions

View file

@ -332,7 +332,7 @@ namespace xo {
MutationLogEntry to_entry(parent_to, p_data_to, from_entry.snap());
this->_check_keep_mutation_aux(gc,
this->_check_keep_mutation_aux(gc->gco_store(),
to_entry,
parent_gen_to,
child_to,
@ -408,25 +408,26 @@ namespace xo {
// child_to generation in {gen, gen+1}
this->_check_keep_mutation_aux(gc, from_entry, parent_gen, child_to, keep_mlog);
this->_check_keep_mutation_aux(gc->gco_store(),
from_entry, parent_gen, child_to, keep_mlog);
return counters;
}
bool
MutationLogState::_check_keep_mutation_aux(DX1Collector * gc,
MutationLogState::_check_keep_mutation_aux(const GCObjectStore & gco_store,
const MutationLogEntry & from_entry,
Generation parent_gen_to,
void * child_to,
MutationLog * keep_mlog)
{
Generation child_gen_to
= gc->generation_of(role::to_space(), child_to);
= gco_store.generation_of(role::to_space(), child_to);
bool need_mlog_entry
= ((child_gen_to + 1 < config_.n_generation_)
&& (gc->config().promotion_threshold(parent_gen_to)
> gc->config().promotion_threshold(child_gen_to)));
&& (config_.promotion_threshold(parent_gen_to)
> config_.promotion_threshold(child_gen_to)));
if (need_mlog_entry) {
// 1. P->C pointer is still cross-age (xage), and