diff --git a/src/hotspot/share/runtime/javaThread.cpp b/src/hotspot/share/runtime/javaThread.cpp index 0ec1236785b79..49972b9cfd213 100644 --- a/src/hotspot/share/runtime/javaThread.cpp +++ b/src/hotspot/share/runtime/javaThread.cpp @@ -419,7 +419,6 @@ JavaThread::JavaThread() : _current_waiting_monitor(nullptr), _active_handles(nullptr), _free_handle_block(nullptr), - _Stalled(0), _monitor_chunks(nullptr), diff --git a/src/hotspot/share/runtime/javaThread.hpp b/src/hotspot/share/runtime/javaThread.hpp index 51e3cc31a52b4..880bc0cd5177a 100644 --- a/src/hotspot/share/runtime/javaThread.hpp +++ b/src/hotspot/share/runtime/javaThread.hpp @@ -158,8 +158,6 @@ class JavaThread: public Thread { JNIHandleBlock* _free_handle_block; public: - volatile intptr_t _Stalled; - // For tracking the heavyweight monitor the thread is pending on. ObjectMonitor* current_pending_monitor() { // Use Atomic::load() to prevent data race between concurrent modification and diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp index 8efd4e5b0c184..b1fe22444ae8f 100644 --- a/src/hotspot/share/runtime/objectMonitor.cpp +++ b/src/hotspot/share/runtime/objectMonitor.cpp @@ -269,7 +269,6 @@ ObjectMonitor::ObjectMonitor(oop object) : _cxq(nullptr), _succ(nullptr), _Responsible(nullptr), - _Spinner(0), _SpinDuration(ObjectMonitor::Knob_SpinLimit), _contentions(0), _WaitSet(nullptr), @@ -401,8 +400,6 @@ bool ObjectMonitor::enter(JavaThread* current) { } // We've encountered genuine contention. - assert(current->_Stalled == 0, "invariant"); - current->_Stalled = intptr_t(this); // Try one round of spinning *before* enqueueing current // and before going through the awkward and expensive state @@ -416,7 +413,6 @@ bool ObjectMonitor::enter(JavaThread* current) { "object mark must match encoded this: mark=" INTPTR_FORMAT ", encoded this=" INTPTR_FORMAT, object()->mark().value(), markWord::encode(this).value()); - current->_Stalled = 0; return true; } @@ -437,7 +433,6 @@ bool ObjectMonitor::enter(JavaThread* current) { // we only retry once if the deflater thread happens to be slow. install_displaced_markword_in_object(l_object); } - current->_Stalled = 0; add_to_contentions(-1); return false; } @@ -500,7 +495,6 @@ bool ObjectMonitor::enter(JavaThread* current) { add_to_contentions(-1); assert(contentions() >= 0, "must not be negative: contentions=%d", contentions()); - current->_Stalled = 0; // Must either set _recursions = 0 or ASSERT _recursions == 0. assert(_recursions == 0, "invariant"); @@ -1511,8 +1505,6 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { return; } - assert(current->_Stalled == 0, "invariant"); - current->_Stalled = intptr_t(this); current->set_current_waiting_monitor(this); // create a node to be put into the queue @@ -1646,9 +1638,6 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { OrderAccess::fence(); - assert(current->_Stalled != 0, "invariant"); - current->_Stalled = 0; - assert(owner_raw() != current, "invariant"); ObjectWaiter::TStates v = node.TState; if (v == ObjectWaiter::TS_RUN) { @@ -2190,7 +2179,6 @@ void ObjectMonitor::print() const { print_on(tty); } // _cxq = 0x0000000000000000 // _succ = 0x0000000000000000 // _Responsible = 0x0000000000000000 -// _Spinner = 0 // _SpinDuration = 5000 // _contentions = 0 // _WaitSet = 0x0000700009756248 @@ -2220,7 +2208,6 @@ void ObjectMonitor::print_debug_style_on(outputStream* st) const { st->print_cr(" _cxq = " INTPTR_FORMAT, p2i(_cxq)); st->print_cr(" _succ = " INTPTR_FORMAT, p2i(_succ)); st->print_cr(" _Responsible = " INTPTR_FORMAT, p2i(_Responsible)); - st->print_cr(" _Spinner = %d", _Spinner); st->print_cr(" _SpinDuration = %d", _SpinDuration); st->print_cr(" _contentions = %d", contentions()); st->print_cr(" _WaitSet = " INTPTR_FORMAT, p2i(_WaitSet)); diff --git a/src/hotspot/share/runtime/objectMonitor.hpp b/src/hotspot/share/runtime/objectMonitor.hpp index d69cf5eba8c95..6c0d5213605ad 100644 --- a/src/hotspot/share/runtime/objectMonitor.hpp +++ b/src/hotspot/share/runtime/objectMonitor.hpp @@ -175,7 +175,6 @@ class ObjectMonitor : public CHeapObj { JavaThread* volatile _succ; // Heir presumptive thread - used for futile wakeup throttling JavaThread* volatile _Responsible; - volatile int _Spinner; // for exit->spinner handoff optimization volatile int _SpinDuration; int _contentions; // Number of active contentions in enter(). It is used by is_busy()