RFR: 8291555: Implement alternative fast-locking scheme [v29]

Roman Kennke rkennke at openjdk.org
Tue Mar 28 13:12:54 UTC 2023


On Fri, 24 Mar 2023 10:50:39 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'origin/JDK-8291555-v2' into JDK-8291555-v2
>>  - Set condition flags correctly after fast-lock call on aarch64
>
> src/hotspot/cpu/aarch64/aarch64.ad line 3848:
> 
>> 3846:         __ bind(slow);
>> 3847:         __ tst(oop, oop); // Force ZF=0 to indicate failure and take slow-path. We know that oop != null.
>> 3848:         __ b(no_count);
> 
> Is this a micro-optimization? I think we can simplify the code by just setting the flags here and then jumping into the usual `__ b(cont)`. This would make the move of `__ b(cont)` unnecessary below.

Well it avoids one conditional branch, so yeah I guess it's an optimization. If you don't like the b(cont) I can still move it back to where it was. It would be a dead instruction with fast-locking, though.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1150585671


More information about the serviceability-dev mailing list