Skip to content
Permalink
Browse files

fix JVMTI GetThreadState to get vthread suspended status from carrier…

… thread
  • Loading branch information
sspitsyn committed Feb 20, 2020
1 parent 1a1449e commit 1525c3a6c71ea983b56f8016d8a67fade7ecd651
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/hotspot/share/prims/jvmtiEnvBase.cpp
@@ -1811,6 +1811,10 @@ VM_VirtualThreadGetThreadState::doit() {

if ((vthread_state & java_lang_VirtualThread::RUNNING) && carrier_thread_oop != NULL) {
state = java_lang_Thread::get_thread_status(carrier_thread_oop);
JavaThread* java_thread = java_lang_Thread::thread(carrier_thread_oop);
if (java_thread->is_being_ext_suspended()) {
state |= JVMTI_THREAD_STATE_SUSPENDED;
}
} else {
state = (jint) java_lang_VirtualThread::map_state_to_thread_status(vthread_state);
}

0 comments on commit 1525c3a

Please sign in to comment.
You can’t perform that action at this time.