--- old/src/hotspot/share/runtime/objectMonitor.cpp 2017-10-13 11:46:44.655734899 -0400 +++ new/src/hotspot/share/runtime/objectMonitor.cpp 2017-10-13 11:46:44.160940847 -0400 @@ -249,7 +249,7 @@ // and to reduce RTS->RTO cache line upgrades on SPARC and IA32 processors. Thread * const Self = THREAD; - void * cur = Atomic::cmpxchg((void*)Self, &_owner, (void*)NULL); + void * cur = Atomic::cmpxchg(Self, &_owner, (void*)NULL); if (cur == NULL) { // Either ASSERT _recursions == 0 or explicitly set _recursions = 0. assert(_recursions == 0, "invariant"); @@ -406,7 +406,7 @@ int ObjectMonitor::TryLock(Thread * Self) { void * own = _owner; if (own != NULL) return 0; - if (Atomic::cmpxchg((void*)Self, &_owner, (void*)NULL) == NULL) { + if (Atomic::cmpxchg(Self, &_owner, (void*)NULL) == NULL) { // Either guarantee _recursions == 0 or set _recursions = 0. assert(_recursions == 0, "invariant"); assert(_owner == Self, "invariant"); @@ -992,7 +992,7 @@ // to reacquire the lock the responsibility for ensuring succession // falls to the new owner. // - if (Atomic::cmpxchg((void*)THREAD, &_owner, (void*)NULL) != NULL) { + if (Atomic::cmpxchg(THREAD, &_owner, (void*)NULL) != NULL) { return; } TEVENT(Exit - Reacquired); @@ -1017,7 +1017,7 @@ // B. If the elements forming the EntryList|cxq are TSM // we could simply unpark() the lead thread and return // without having set _succ. - if (Atomic::cmpxchg((void*)THREAD, &_owner, (void*)NULL) != NULL) { + if (Atomic::cmpxchg(THREAD, &_owner, (void*)NULL) != NULL) { TEVENT(Inflated exit - reacquired succeeded); return; } @@ -1980,7 +1980,7 @@ Thread * ox = (Thread *) _owner; if (ox == NULL) { - ox = (Thread*)Atomic::cmpxchg((void*)Self, &_owner, (void*)NULL); + ox = (Thread*)Atomic::cmpxchg(Self, &_owner, (void*)NULL); if (ox == NULL) { // The CAS succeeded -- this thread acquired ownership // Take care of some bookkeeping to exit spin state.