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

Roman Kennke rkennke at openjdk.java.net
Tue Nov 17 21:51:11 UTC 2020


On Tue, 17 Nov 2020 19:28:18 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> 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

Looks good, except change one comment a little.

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1746:

> 1744:       if (!is_degenerated_gc_in_progress()) {
> 1745:         // We need to arm nmethods for concurrent codecache process, regardless concurrent
> 1746:         // class unloading

Comment should probably not refer to previous implementations. Future readers will not see the connection there.

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

Marked as reviewed by rkennke (Reviewer).

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



More information about the hotspot-gc-dev mailing list