RFR: 8249801: Shenandoah: Clear soft-refs on requested GC cycle
Aleksey Shipilev
shade at redhat.com
Tue Jul 21 14:44:48 UTC 2020
On 7/21/20 4:38 PM, rkennke at redhat.com wrote:
> Webrev:
> http://cr.openjdk.java.net/~rkennke/JDK-8249801/webrev.01/
Looks fine.
Let's leave the _gc_requested flag alone (the intent to read it at the beginning), and instead poll
explicit/implicit gc requests, plus fix the comment:
diff -r e0788e02e0de src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp Tue Jul 21 14:07:45 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp Tue Jul 21 16:43:46 2020 +0200
@@ -175,6 +175,6 @@
// 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);
}
--
Thanks,
-Aleksey
More information about the hotspot-gc-dev
mailing list