RFR: 8287818: Shenandoah: adapt nmethod arming from Loom
Aleksey Shipilev
shade at openjdk.org
Wed Jun 22 15:32:36 UTC 2022
On Mon, 6 Jun 2022 23:29:10 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> Loom implemented nmethod arming mechanism, which is very similar to Shenandoah's. Shenandoah can use it.
>
> Test:
>
> - [x] hotspot_gc_shenandoah on Linux x86_64 and Windows x64
> - [x] tier1 with Shenandoah GC on Linux x86_64 and Windows x64
> - [x] hotspot_gc_shenandoah on AArch64
Looks mostly fine to me, but I have questions.
src/hotspot/share/gc/shenandoah/shenandoahBarrierSetNMethod.cpp line 72:
> 70: ShenandoahNMethod::disarm_nmethod(nm);
> 71: return true;
> 72: }
Nit: missing newline.
src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp line 129:
> 127:
> 128: void ShenandoahCodeRoots::arm_nmethods() {
> 129: BarrierSet::barrier_set()->barrier_set_nmethod()->arm_all_nmethods();
Question: in `ShenandoahBarrierSet::on_thread_attach`, we check `barrier_set_nmethod() != NULL`, do we need to do the same check here, or?
-------------
PR: https://git.openjdk.org/jdk/pull/9048
More information about the hotspot-gc-dev
mailing list