[sh/8u] RFR 8267561: Shenandoah: Reference processing not properly setup for outside of cycle degenerated GC
Roman Kennke
rkennke at redhat.com
Tue May 25 20:20:55 UTC 2021
Looks good!
Thanks, Roman
> Shenandoah 8u suffers the same problem as 11u, that could slowly leak
> heap memory due to not process weak references.
>
> 11u patch applies cleanly to Shenandoah 8u, however, it does not
> compile, as APIs are slightly different between 11u and 8u, fixed as
> follow:
>
> diff -r 0a4911d2aac7
> src/share/vm/gc_implementation/shenandoah/shenandoahHeap.cpp
> --- a/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.cpp Tue
> May 25 13:04:23 2021 -0400
> +++ b/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.cpp Tue
> May 25 13:27:02 2021 -0400
> @@ -1647,8 +1647,8 @@
> rp->set_active_mt_degree(_heap->workers()->active_workers());
>
> // enable ("weak") refs discovery
> - rp->enable_discovery(true /*verify_no_refs*/);
> - rp->setup_policy(_heap->soft_ref_policy()->should_clear_all_soft_refs());
> + rp->enable_discovery(true /*verify_no_refs*/, true);
> +
> rp->setup_policy(_heap->collector_policy()->should_clear_all_soft_refs());
> }
>
>
> Shenandoah 8u webrev:
> http://cr.openjdk.java.net/~zgu/JDK-8267561-8u/webrev.00/
>
> Test:
> hotspot_gc_shenandoah
>
> Thanks,
>
> -Zhengyu
>
More information about the shenandoah-dev
mailing list