diff -r bb89bc4d6689 -r e17143e28542 src/hotspot/share/runtime/thread.cpp --- a/src/hotspot/share/runtime/thread.cpp Thu Sep 19 17:33:18 2019 -0700 +++ b/src/hotspot/share/runtime/thread.cpp Sat Sep 21 12:10:52 2019 +0200 @@ -2894,7 +2894,7 @@ #endif // PRODUCT -void JavaThread::deoptimized_wrt_marked_nmethods() { +void JavaThread::deoptimize_marked_methods() { if (!has_last_Java_frame()) return; // BiasedLocking needs an updated RegisterMap for the revoke monitors pass StackFrameStream fst(this, UseBiasedLocking); @@ -2905,7 +2905,6 @@ } } - // If the caller is a NamedThread, then remember, in the current scope, // the given JavaThread in its _processed_thread field. class RememberProcessedThread: public StackObj { @@ -4638,13 +4637,6 @@ threads_do(&handles_closure); } -void Threads::deoptimized_wrt_marked_nmethods() { - ALL_JAVA_THREADS(p) { - p->deoptimized_wrt_marked_nmethods(); - } -} - - // Get count Java threads that are waiting to enter the specified monitor. GrowableArray* Threads::get_pending_threads(ThreadsList * t_list, int count, @@ -5000,65 +4992,6 @@ } } -void Thread::muxAcquireW(volatile intptr_t * Lock, ParkEvent * ev) { - intptr_t w = Atomic::cmpxchg(LOCKBIT, Lock, (intptr_t)0); - if (w == 0) return; - if ((w & LOCKBIT) == 0 && Atomic::cmpxchg(w|LOCKBIT, Lock, w) == w) { - return; - } - - ParkEvent * ReleaseAfter = NULL; - if (ev == NULL) { - ev = ReleaseAfter = ParkEvent::Allocate(NULL); - } - assert((intptr_t(ev) & LOCKBIT) == 0, "invariant"); - for (;;) { - guarantee(ev->OnList == 0, "invariant"); - int its = (os::is_MP() ? 100 : 0) + 1; - - // Optional spin phase: spin-then-park strategy - while (--its >= 0) { - w = *Lock; - if ((w & LOCKBIT) == 0 && Atomic::cmpxchg(w|LOCKBIT, Lock, w) == w) { - if (ReleaseAfter != NULL) { - ParkEvent::Release(ReleaseAfter); - } - return; - } - } - - ev->reset(); - ev->OnList = intptr_t(Lock); - // The following fence() isn't _strictly necessary as the subsequent - // CAS() both serializes execution and ratifies the fetched *Lock value. - OrderAccess::fence(); - for (;;) { - w = *Lock; - if ((w & LOCKBIT) == 0) { - if (Atomic::cmpxchg(w|LOCKBIT, Lock, w) == w) { - ev->OnList = 0; - // We call ::Release while holding the outer lock, thus - // artificially lengthening the critical section. - // Consider deferring the ::Release() until the subsequent unlock(), - // after we've dropped the outer lock. - if (ReleaseAfter != NULL) { - ParkEvent::Release(ReleaseAfter); - } - return; - } - continue; // Interference -- *Lock changed -- Just retry - } - assert(w & LOCKBIT, "invariant"); - ev->ListNext = (ParkEvent *) (w & ~LOCKBIT); - if (Atomic::cmpxchg(intptr_t(ev)|LOCKBIT, Lock, w) == w) break; - } - - while (ev->OnList != 0) { - ev->park(); - } - } -} - // Release() must extract a successor from the list and then wake that thread. // It can "pop" the front of the list or use a detach-modify-reattach (DMR) scheme // similar to that used by ParkEvent::Allocate() and ::Release(). DMR-based