RFR: 8309612: [REDO] JDK-8307153 JVMTI GetThreadState on carrier should return STATE_WAITING [v4]

Serguei Spitsyn sspitsyn at openjdk.org
Wed Jun 7 21:22:49 UTC 2023


On Wed, 7 Jun 2023 20:10:24 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix trailing space in jvmtiEnvBase.cpp
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 765:
> 
>> 763:   if (is_thread_carrying_vthread(jt, thread_oop)) {
>> 764:     state &= ~JVMTI_THREAD_STATE_RUNNABLE;
>> 765:     state |= JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY;
> 
> How about a comment here:
> 
> "Clear RUNNABLE state and add WAITING state because..."

Thanks. Added comment.

> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1739:
> 
>> 1737:          "sanity check");
>> 1738: 
>> 1739:   // An attempt to handshake-suspend a thread carrying virtual thread will result in
> 
> Suggestion:
> 
>   // An attempt to handshake-suspend a thread carrying a virtual thread will result in

Thanks. Updated now.

> src/hotspot/share/prims/jvmtiEnvBase.hpp line 99:
> 
>> 97:   static bool is_in_thread_list(jint count, const jthread* list, oop jt_oop);
>> 98: 
>> 99:   // check if thread_oop represents a thread carrying virtual thread
> 
> Suggestion:
> 
>   // check if thread_oop represents a thread carrying a virtual thread

Thanks. Updated now.

> src/hotspot/share/prims/jvmtiEnvBase.hpp line 183:
> 
>> 181: 
>> 182:   // Return true if the thread identified with a pair <jt,thr_obj> is current.
>> 183:   // A thread carrying virtual thread is not treated as current.
> 
> Suggestion:
> 
>   // A thread carrying a virtual thread is not treated as current.

Thanks. Updated now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14366#discussion_r1222185513
PR Review Comment: https://git.openjdk.org/jdk/pull/14366#discussion_r1222185817
PR Review Comment: https://git.openjdk.org/jdk/pull/14366#discussion_r1222185985
PR Review Comment: https://git.openjdk.org/jdk/pull/14366#discussion_r1222186135


More information about the hotspot-dev mailing list