RFR: 8255847: Shenandoah: Shenandoah should not mark through weak roots

Zhengyu Gu zgu at openjdk.java.net
Wed Nov 4 00:17:59 UTC 2020


After moving weak root processing into concurrent phase, Shenandoah should no longer marks through weak roots, even when class unloading is disabled, given weak root processing no longer contributes to latency.

There are a couple of bugs:
1) ShenandoahRootVerifier was not updated to reflect the change.
The problem did not show up due to SH::parallel_cleaning() uses wrong flag to determine if it should cleanup weak roots, and it will be addressed in separate CR.

2) Concurrent roots scanner should not mark through string dedup roots.

Test:
- [x]  hotspot_gc_shenandoah
- [x]  hotspot_gc_shenandoah with -XX:+ShenandoahVerify -XX:-ClassUnloading
- [x]  hotspot_gc_shenandoah with -XX:+ShenandoahVerify -XX:+UseStringDeduplication

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

Commit messages:
 - Remove StrDedup root from concurrent root scanner
 - 8255847: Shenandoah: Shenandoah root verifier's roots_do() should not include weak roots

Changes: https://git.openjdk.java.net/jdk/pull/1050/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1050&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255847
  Stats: 11 lines in 3 files changed: 0 ins; 11 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1050.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1050/head:pull/1050

PR: https://git.openjdk.java.net/jdk/pull/1050



More information about the hotspot-gc-dev mailing list