RFR: 8265753: Remove manual JavaThread transitions to blocked [v3]

Robbin Ehn rehn at openjdk.java.net
Mon May 17 11:24:42 UTC 2021


On Mon, 17 May 2021 09:32:23 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 395:
> 
>> 393:           ThreadBlockInVMPreprocess<ExitOnSuspend> tbivmp(jt, eos);
>> 394:           simple_enter(jt);
>> 395:           _recursions = save;
> 
> I think you should restore `_recursions` only when finally leaving the loop because if you do it here and exit the monitor again because of a suspend then another thread could hit the `guarantee(_recursions == 0, "invariant")` at L349. This is a preexisting issue but since you're modifying this I reckon it makes sense to correct it.

Fixed

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

PR: https://git.openjdk.java.net/jdk/pull/3875


More information about the hotspot-runtime-dev mailing list