[jdk16] RFR: 8258714: Shenandoah: Process references before evacuation during degen
Aleksey Shipilev
shade at openjdk.java.net
Mon Dec 21 12:13:08 UTC 2020
On Mon, 21 Dec 2020 12:05:23 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:
> - [x] 30 good runs of hotspot_gc_shenandoah, which showed the crash fairly reliably before
>
> Ok?
Looks good!
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk16/pull/55
More information about the shenandoah-dev
mailing list