Skip to content

Commit 006d0bc

Browse files
committed
8249801: Shenandoah: Clear soft-refs on requested GC cycle
Reviewed-by: shade
1 parent a20c318 commit 006d0bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ void ShenandoahControlThread::run_service() {
174174
}
175175

176176
// Blow all soft references on this cycle, if handling allocation failure,
177-
// or we are requested to do so unconditionally.
178-
if (alloc_failure_pending || ShenandoahAlwaysClearSoftRefs) {
177+
// either implicit or explicit GC request, or we are requested to do so unconditionally.
178+
if (alloc_failure_pending || implicit_gc_requested || explicit_gc_requested || ShenandoahAlwaysClearSoftRefs) {
179179
heap->soft_ref_policy()->set_should_clear_all_soft_refs(true);
180180
}
181181

0 commit comments

Comments
 (0)