RFR: 8256415: Shenandoah: Should evacuate/update codecache concurrently when class unloading is off

Zhengyu Gu zgu at openjdk.java.net
Tue Nov 17 19:35:10 UTC 2020


During isolating GC work (JDK-8255765), I found that Shenandoah still evacuate/update codecache roots at final mark safepoint when class unloading is off.

Actually, it can be done concurrently by utilizing nmethod_entry_barrier.

Shenandoah should always enable nmethod_entry_barrier for evacuation, regardless class unloading status, and perform code cache evacuation/updating during strong root processing.

Key points:
1) Always enable nmethod entry barrier
2) Always attach ShenandoahNMethod to nmethod, regardless weather class unloading is enabled
3) Only evacuate/update thread and serial weak roots at final mark pause.
4) Code roots are evacuated/updated concurrently during weak roots (when class unloading is on) or strong roots (when class unloading is off)


- [x] hotspot_gc_shenandoah
- [x] tier1 with ShenandoahGC and +/-ClassUnloading

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

Commit messages:
 - Always disarm on-stack nmethods during init evaculation
 - Merge branch 'master' into JDK-8256415-conc-code-no-classunloading
 - Evacuate/update code roots concurrently when class unloading is off

Changes: https://git.openjdk.java.net/jdk/pull/1271/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1271&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256415
  Stats: 170 lines in 10 files changed: 56 ins; 90 del; 24 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1271.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1271/head:pull/1271

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


More information about the hotspot-gc-dev mailing list