8249801: Shenandoah: Clear soft-refs on requested GC cycle

Reviewed-by: shade
This commit is contained in:
Roman Kennke 2020-07-21 17:27:44 +02:00
parent a20c31865d
commit 006d0bcec1

View file

@ -174,8 +174,8 @@ void ShenandoahControlThread::run_service() {
}
// Blow all soft references on this cycle, if handling allocation failure,
// or we are requested to do so unconditionally.
if (alloc_failure_pending || ShenandoahAlwaysClearSoftRefs) {
// either implicit or explicit GC request, or we are requested to do so unconditionally.
if (alloc_failure_pending || implicit_gc_requested || explicit_gc_requested || ShenandoahAlwaysClearSoftRefs) {
heap->soft_ref_policy()->set_should_clear_all_soft_refs(true);
}