RFR: 8308400: add ForceEarlyReturn support for virtual threads [v2]

Serguei Spitsyn sspitsyn at openjdk.org
Tue May 23 06:51:53 UTC 2023


On Sat, 20 May 2023 16:03:20 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   minor tweak in libForceEarlyReturnTest.cpp
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 2078:
> 
>> 2076:     return; /* JVMTI_ERROR_THREAD_NOT_ALIVE (default) */
>> 2077:   }
>> 2078:   if (!self) {
> 
> Can't we have any racing by removing this check?
> We are checking thread state before handshake operation, but it is changed before thread start execution of this handshake?

Thank you for the comment.
No, there can be no race here. If a JVMTI function is called (or not called) on the current thread (eg. the target thread is current) then it can't change while the JVMTI function is executed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14067#discussion_r1201618998


More information about the hotspot-dev mailing list