[jdk16] RFR: 8258714: Shenandoah: Process references before evacuation during degen [v2]
Roman Kennke
rkennke at openjdk.java.net
Mon Dec 21 12:32:13 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)
>
> 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?
Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
Add new _weakrefs_process phases to ShPhaseTimings::is_worker_phase()
-------------
Changes:
- all: https://git.openjdk.java.net/jdk16/pull/55/files
- new: https://git.openjdk.java.net/jdk16/pull/55/files/fbeb6f77..29b98531
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk16&pr=55&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk16&pr=55&range=00-01
Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk16/pull/55.diff
Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/55/head:pull/55
PR: https://git.openjdk.java.net/jdk16/pull/55
More information about the hotspot-gc-dev
mailing list