diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp index 8d34fccb0d3b2..d1c494fe51e13 100644 --- a/src/hotspot/share/runtime/objectMonitor.cpp +++ b/src/hotspot/share/runtime/objectMonitor.cpp @@ -1692,6 +1692,7 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { return; } } + // The jtiows does nothing for non-interruptible. JavaThreadInObjectWaitState jtiows(current, millis != 0, interruptible); // create a node to be put into the queue diff --git a/src/hotspot/share/services/threadService.hpp b/src/hotspot/share/services/threadService.hpp index 61a37ef6dfa8d..8623e0d048260 100644 --- a/src/hotspot/share/services/threadService.hpp +++ b/src/hotspot/share/services/threadService.hpp @@ -491,7 +491,7 @@ class JavaThreadInObjectWaitState : public JavaThreadStatusChanger { JavaThreadStatusChanger(java_thread, interruptible ? (timed ? JavaThreadStatus::IN_OBJECT_WAIT_TIMED : JavaThreadStatus::IN_OBJECT_WAIT) : java_lang_Thread::get_thread_status(java_thread->threadObj())) { - if (is_alive() && interruptible) { + if (is_alive() && interruptible) { // non-interruptible is not active _stat = java_thread->get_thread_stat(); _active = ThreadService::is_thread_monitoring_contention(); _stat->monitor_wait();