[jdk16] RFR: 8258714: Shenandoah: Process references before evacuation during degen

Roman Kennke rkennke at openjdk.java.net
Mon Dec 21 12:13:08 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?

-------------

Commit messages:
 - 8258714: Shenandoah: Process references before evacuation during degen

Changes: https://git.openjdk.java.net/jdk16/pull/55/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk16&pr=55&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/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