Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/hotspot/share/runtime/javaThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ JavaThread::JavaThread() :
_current_waiting_monitor(nullptr),
_active_handles(nullptr),
_free_handle_block(nullptr),
_Stalled(0),

_monitor_chunks(nullptr),

Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/share/runtime/javaThread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions src/hotspot/share/runtime/objectMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ ObjectMonitor::ObjectMonitor(oop object) :
_cxq(nullptr),
_succ(nullptr),
_Responsible(nullptr),
_Spinner(0),
_SpinDuration(ObjectMonitor::Knob_SpinLimit),
_contentions(0),
_WaitSet(nullptr),
Expand Down Expand Up @@ -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
Expand All @@ -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;
}

Expand All @@ -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;
}
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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));
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/runtime/objectMonitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ class ObjectMonitor : public CHeapObj<mtObjectMonitor> {
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()
Expand Down