8251910: Shenandoah: Handshake threads between weak-roots and reset phases

Reviewed-by: rkennke
This commit is contained in:
Zhengyu Gu 2020-08-18 13:34:10 -04:00
parent 9871f3a27a
commit f797e19e3d
4 changed files with 31 additions and 2 deletions

View file

@ -424,6 +424,12 @@ void ShenandoahControlThread::service_concurrent_normal_cycle(GCCause::Cause cau
// Update references freed up collection set, kick the cleanup to reclaim the space.
heap->entry_cleanup_complete();
} else {
// Concurrent weak/strong root flags are unset concurrently. We depend on updateref GC safepoints
// to ensure the changes are visible to all mutators before gc cycle is completed.
// In case of no evacuation, updateref GC safepoints are skipped. Therefore, we will need
// to perform thread handshake to ensure their consistences.
heap->entry_rendezvous_roots();
}
// Cycle is complete