mark_card_deferred is only called from two places:
- UpdateRSetDeferred::do_oop_nv
- G1ParScanThreadState::update_rs
In the case of UpdateRSetDeferred::do_oop_nv, the check is always false because we clear the card table in cleanup_after_oops_into_collection_set_do prior to calling remove_self_forwarding_pointers.
In the case of G1ParScanThreadState::update_rs, then we can update the check whether to mark a card or not to check !from->is_young instead of !from->is_survivor.
Therefore, the if statement:
if (val == g1_young_gen) {
return false;
}
can be removed from G1SATBCardTableModRefBS::mark_card_deferred.
- UpdateRSetDeferred::do_oop_nv
- G1ParScanThreadState::update_rs
In the case of UpdateRSetDeferred::do_oop_nv, the check is always false because we clear the card table in cleanup_after_oops_into_collection_set_do prior to calling remove_self_forwarding_pointers.
In the case of G1ParScanThreadState::update_rs, then we can update the check whether to mark a card or not to check !from->is_young instead of !from->is_survivor.
Therefore, the if statement:
if (val == g1_young_gen) {
return false;
}
can be removed from G1SATBCardTableModRefBS::mark_card_deferred.