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

Robbin Ehn rehn at openjdk.java.net
Mon May 17 07:58:23 UTC 2021


On Fri, 14 May 2021 09:50:56 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 47:
> 
>> 45:   JavaThread* current_java_thread = JavaThread::current();
>> 46:   assert(current_java_thread->thread_state() == _thread_in_vm, "Must be in vm");
>> 47:   {
> 
> Looks like the assertion in L46 is redundant now. ThreadToNativeFromVM asserts as well.

Fixed

> src/hotspot/share/prims/jvmtiRawMonitor.cpp line 410:
> 
>> 408:     ret = simple_wait(self, millis);
>> 409:     _waiters--;
>> 410:     _recursions = save;
> 
> The values of `_waiters` and `_recursions` should be adjusted after the monitor is owned again.

Fixed

> src/hotspot/share/prims/jvmtiRawMonitor.hpp line 52:
> 
>> 50: // native for all operations. However we need to honor a suspend request, not
>> 51: // entering a monitor if suspended, and check for interrupts. Honoring a suspend
>> 52: // request// and reading the interrupt flag must be done from VM state
> 
> `s/request///request/` ��

Fixed

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

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


More information about the hotspot-runtime-dev mailing list