RFR: 8258714: Shenandoah: Process references before evacuation during degen
Aleksey Shipilev
shade at openjdk.java.net
Mon Dec 21 12:01:55 UTC 2020
On Mon, 21 Dec 2020 11:37:31 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> Currently, when doing degen-cycle, we process references right before immediate-garbage cleanup. It is imperative that we process references before any immediate garbage gets recycled, or else we may end up with bad references during reference-processing. However, the trouble is that immediate garbage can be recycled even before cleanup phase by recycle-assist. For this reason, we must process references before any evacuation during degen GC. It is also more natural: we process refs before weak roots and class-unloading during concurrent cycle, and should do the same during degen cycle.
> (Note that we already prevent recycle-assist in concurrent phase)
>
> The change also adds STW timing for the weak-refs-processing, rather than polluting the conc-weak-refs timings.
>
> Testing: 30 good runs of hotspot_gc_shenandoah, which showed the crash fairly reliably before
>
> Ok?
This looks good, but I think this PR should be against `openjdk/jdk16` to get it fixed in JDK 16 (where I think the bug is).
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1859
More information about the hotspot-gc-dev
mailing list