Skip to content
Permalink
Browse files

revert JVMTI GetThreadState change for java_lang_VirtualThread::RUNNING

  • Loading branch information
sspitsyn committed Feb 20, 2020
1 parent 1525c3a commit b6ee28b3564ba3302e1febd7444a25d159b4e8b5
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/hotspot/share/prims/jvmtiEnv.cpp
  2. +1 −1 src/hotspot/share/prims/jvmtiEnvBase.cpp
@@ -925,7 +925,7 @@ JvmtiEnv::GetThreadState(jthread thread, jint* thread_state_ptr) {
}
jshort vthread_state = java_lang_VirtualThread::state(thread_oop);

if (!(vthread_state & java_lang_VirtualThread::RUNNING)) {
if (vthread_state != java_lang_VirtualThread::RUNNING) {
jint state = (jint) java_lang_VirtualThread::map_state_to_thread_status(vthread_state);
if (java_lang_Thread::interrupted(thread_oop)) {
state |= JVMTI_THREAD_STATE_INTERRUPTED;
@@ -1809,7 +1809,7 @@ VM_VirtualThreadGetThreadState::doit() {
oop carrier_thread_oop = java_lang_VirtualThread::carrier_thread(_vthread_h());
jint state;

if ((vthread_state & java_lang_VirtualThread::RUNNING) && carrier_thread_oop != NULL) {
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()) {

0 comments on commit b6ee28b

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