RFR: 8258714: Shenandoah: Process references before evacuation during degen
Roman Kennke
rkennke at openjdk.java.net
Mon Dec 21 11:42:01 UTC 2020
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, except JDK-8258706)
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?
-------------
Commit messages:
- 8258714: Shenandoah: Process references before evacuation during degen
Changes: https://git.openjdk.java.net/jdk/pull/1859/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1859&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8258714
Stats: 20 lines in 4 files changed: 13 ins; 7 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/1859.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1859/head:pull/1859
PR: https://git.openjdk.java.net/jdk/pull/1859
More information about the shenandoah-dev
mailing list