[aarch64-port-dev ] RFR: 8217368: AArch64: C2 recursive stack locking optimisation not triggered
Dmitry Samersoff
dms at samersoff.net
Wed Apr 3 13:21:48 UTC 2019
Hello Nick,
Glad to see this cleanup.
3528 __ cmp(rscratch1, zr); // Sets flags for result
3529 __ cbnz(rscratch1, cont);
Should
__ br(Assembler::NE, cont);
be at line 3529 instead of cbnz ?
-Dmitry
On 22.01.2019 12:10, Nick Gasson (Arm Technology China) wrote:
> 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