[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
Hi,
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
functions:
http://cr.openjdk.java.net/~ngasson/8217368/webrev.1/
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:
http://cr.openjdk.java.net/~ngasson/8217368/generated/
private Object obj = new Object();
public int x;
private void incX() {
synchronized (obj) {
x++;
}
}
The output of webrev.1 looks OK to me. Any other suggestions of things
to test?
Thanks,
Nick
More information about the aarch64-port-dev
mailing list