< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page
rev 51675 : imported patch 8210514

*** 4734,4744 **** if (Atomic::cmpxchg (1, adr, 0) == 0) { return; // normal fast-path return } // Slow-path : We've encountered contention -- Spin/Yield/Block strategy. - TEVENT(SpinAcquire - ctx); int ctr = 0; int Yields = 0; for (;;) { while (*adr != 0) { ++ctr; --- 4734,4743 ----
*** 4829,4839 **** if (w == 0) return; if ((w & LOCKBIT) == 0 && Atomic::cmpxchg(w|LOCKBIT, Lock, w) == w) { return; } - TEVENT(muxAcquire - Contention); ParkEvent * const Self = Thread::current()->_MuxEvent; assert((intptr_t(Self) & LOCKBIT) == 0, "invariant"); for (;;) { int its = (os::is_MP() ? 100 : 0) + 1; --- 4828,4837 ----
*** 4875,4885 **** if (w == 0) return; if ((w & LOCKBIT) == 0 && Atomic::cmpxchg(w|LOCKBIT, Lock, w) == w) { return; } - TEVENT(muxAcquire - Contention); ParkEvent * ReleaseAfter = NULL; if (ev == NULL) { ev = ReleaseAfter = ParkEvent::Allocate(NULL); } assert((intptr_t(ev) & LOCKBIT) == 0, "invariant"); --- 4873,4882 ----
< prev index next >