[aarch64-port-dev ] RFR: 8217368: AArch64: C2 recursive stack locking optimisation not triggered
Andrew Haley
aph at redhat.com
Tue Jan 22 09:36:13 UTC 2019
Hi,
On 1/22/19 9:10 AM, Nick Gasson (Arm Technology China) wrote:
>
> 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/
Excellent, thanks for that. Otherwise I'd have had to generate these myself.
> 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?
That looks right, thanks. It's extremely difficult to test this stuff in practice.
Does any of the above stress test recursive locking in the presence of many threads?
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-compiler-dev
mailing list