RFR: 8265753: Remove manual JavaThread transitions to blocked [v3]
David Holmes
dholmes at openjdk.java.net
Mon May 17 01:38:47 UTC 2021
On Fri, 14 May 2021 17:53:15 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fixes for Dan
>
> src/hotspot/share/prims/jvmtiRawMonitor.cpp line 386:
>
>> 384: _waiters++;
>> 385: ret = simple_wait(self, millis);
>> 386: _waiters--;
>
> We don't own the monitor yet so you cannot modify `_waiters` here.
> Any reason you moved and duplicated this block?
Good catch! Even if the block wasn't moved we still no longer own the monitor after simple_wait.
This is going to be tricky to fix in a clear/clean way as the waiters count has to be maintained properly.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3875
More information about the serviceability-dev
mailing list