[aarch64-port-dev ] RFR: 8216557 Aarch64: Add support for Concurrent Class Unloading

Zhengyu Gu zgu at redhat.com
Fri Mar 27 14:01:15 UTC 2020

Hi Stuart,

Great work!

On 3/26/20 6:42 PM, Stuart Monteith wrote:
> Hello,
>          Please review this change to implement nmethod entry barriers on
> aarch64, and hence concurrent class unloading with ZGC. Shenandoah will
> need to be separately tested and enabled - there are problems with this
> on Shenandoah.

I identified a problem that failed TestStringDedupStress.java, I have 
fix for it.

Would you mind to share what else failed with Shenandoah?



> It has been tested with JTreg, runs with SPECjbb, gcbench, and Lucene as
> well as Netbeans.
> In terms of interesting features:
>           With nmethod entry barriers,  immediate oops are removed by:
>                  LIR_Assembler::jobject2reg  and  MacroAssembler::movoop
>          This is to ensure consistency with the entry barrier, as otherwise with
> an immediate we'd otherwise need an ISB.
>          I've added "-XX:DeoptNMethodBarrierALot". I found this functionality
> useful in testing as deoptimisation is very infrequent. I've written it
> as an atomic to avoid it happening too frequently. As it is a new
> option, I'm not sure whether any more is needed than this review. A new
> test has been added
> "test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherDeoptWithZ.java" to
> test GC with that option enabled.
>          BarrierSetAssembler::nmethod_entry_barrier
>          This method emits the barrier code. In internal review it was suggested
> the "dmb( ISHLD )" should be replaced by "membar(LoadLoad)". I've not
> done this as the BarrierSetNMethod code checks the exact instruction
> sequence, and I prefer to be explicit.
>          Benchmarking method entry shows an increase of around 6ns with the
> nmethod entry barrier.
> The deoptimisation code was contributed by Andrew Haley.
> The bug:
>          https://bugs.openjdk.java.net/browse/JDK-8216557
> The webrev:
>          http://cr.openjdk.java.net/~smonteith/8216557/webrev.0/
> BR,
>          Stuart
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

More information about the zgc-dev mailing list