RFR: 8331411: Shenandoah: Reconsider spinning duration in ShenandoahLock [v4]

Xiaolong Peng xpeng at openjdk.org
Tue Jun 25 08:06:49 UTC 2024


On Tue, 25 Jun 2024 07:11:04 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix linux-x64-hs-zero build failure
>
> src/hotspot/share/gc/shenandoah/shenandoahLock.cpp line 37:
> 
>> 35: void ShenandoahLock::contended_lock(bool allow_block_for_safepoint) {
>> 36:   Thread* thread = Thread::current();
>> 37:   if (thread->is_Java_thread() && allow_block_for_safepoint) {
> 
> Please flip `&&` back. It is easier to short-cut test after a boolean test we know is likely to constant-fold.

Nice catch, thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19570#discussion_r1652200709


More information about the hotspot-gc-dev mailing list