RFR: 8253064: monitor list simplifications and getting rid of TSM [v4]
Daniel D.Daugherty
dcubed at openjdk.java.net
Tue Nov 10 21:25:04 UTC 2020
On Tue, 10 Nov 2020 17:05:16 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
>>
>> dholmes-ora - convert inner while loop to do-while loop in unlink_deflated().
>
> src/hotspot/share/runtime/objectMonitor.cpp line 540:
>
>> 538: if (try_set_owner_from(NULL, DEFLATER_MARKER) != NULL) {
>> 539: // The owner field is no longer NULL so we lost the race since the
>> 540: // ObjectMonitor is now busy.
>
> So here would contentions be > 0? Can it be asserted? Doesn't need to be, the comment really helps to understand why the cas failed.
No we can't assert that (contentions > 0). The ownership
might have been taken by a fast path thread so it grabbed
ownership without having to update contentions and wait.
-------------
PR: https://git.openjdk.java.net/jdk/pull/642
More information about the hotspot-dev
mailing list