RFR: 8319947: Recursive lightweight locking: s390x implementation [v4]

Amit Kumar amitkumar at openjdk.org
Thu May 23 12:52:01 UTC 2024


On Wed, 22 May 2024 07:14:59 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> The current code is fine, but that comment made me wonder why preserving the original top value was important. My think was that you could only change the assert snippet as follows:
>> 
>> #ifdef ASSERT
>>     NearLabel check_done;
>> +   NearLabel loop;
>> +   z_lgf(top, Address(Z_thread, JavaThread::lock_stack_top_offset()));
>> +   bind(loop);
>>     z_aghi(top, -oopSize);
>>     compareU32_and_branch(top, in_bytes(JavaThread::lock_stack_base_offset()),
>>                           bcondLow, check_done);
>>     z_cg(obj, Address(Z_thread, top));
>> -   z_brne(inflated);
>> +   z_brne(loop);
>>     stop("Fast Unlock lock on stack");
>>     bind(check_done);
>> #endif // ASSERT
>> 
>> 
>> then remove the comment and use either whatever register.
>
> I still do not think I understand what ` if we load top there then it could result into infinite loop` is referring to.

@xmas92 I have updated the code, please have a second look. 

Thanks,

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18878#discussion_r1611636785


More information about the hotspot-dev mailing list