[aarch64-port-dev ] RFR: 8217368: AArch64: C2 recursive stack locking optimisation not triggered

Nick Gasson (Arm Technology China) Nick.Gasson at arm.com
Tue Jan 22 09:10:15 UTC 2019


On 21/01/2019 20:27, Andrew Haley wrote:
> OK, if that's your position: you're writing the patch. Using cmpxhg
> everywhere will make that rather twisted code much easier to read.

Please see the updated webrev to use cmpxchg in both the lock and unlock 


Also includes Derek's cleanup suggestions (although some of them are not 
applicable now).

Testing I've done on this:

* Ran jtreg with assertions enabled (+UseLSE)

* Ran jcstress with both +UseLSE and -UseLSE

* Ran the JMH LockUnlock benchmarks with -UseBiasedLocking to check for 
performance regressions.

The directory below contains the the generated assembly from each webrev 
and current hg tip for this simple method:


     private Object obj = new Object();
     public int x;

     private void incX() {
         synchronized (obj) {

The output of webrev.1 looks OK to me. Any other suggestions of things 
to test?


More information about the hotspot-compiler-dev mailing list