On Wed, 7 Jun 2023 11:48:19 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> When a virtual thread is mounted, the carrier thread should be reported as 
>> "waiting" until the virtual thread unmounts. Right now, GetThreadState 
>> reports a state based the JavaThread status when it should return 
>> JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY.
>> The fix adds:
>>  - a special case for passive carrier threads
>>  - necessary test coverage to the existing JVMTI test: 
>> `serviceability/jvmti/vthread/ThreadStateTest`.
>> 
>> Testing:
>>    - tested with the updated test: 
>> `serviceability/jvmti/vthread/ThreadStateTest`
>>    - submitted mach5 tiers 1-5
>>    - TBD: to submit mach5 tier 6
>
> Serguei Spitsyn has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   review: one function renaming

src/hotspot/share/prims/jvmtiEnvBase.cpp line 1741:

> 1739:          "sanity check");
> 1740: 
> 1741:   // An attempt to handshake-suspend a passive carrier thread will 
> result in

The rename from is_passive_carrier_thread  to is_thread_carrying_vthread looks 
fine. There are a few stray comments that still say "passive carrier thread" 
that probably should be cleaned up. I see you've just integrated this change 
but maybe the next change in the area that do this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14298#discussion_r1221598356

Reply via email to