src/hotspot/share/interpreter/oopMapCache.cpp
changeset 59252 623722a6aeb9
parent 59247 56bf71d64d51
child 59290 97d13893ec3c
--- a/src/hotspot/share/interpreter/oopMapCache.cpp	Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/interpreter/oopMapCache.cpp	Mon Nov 25 12:33:15 2019 +0100
@@ -452,7 +452,7 @@
 }
 
 bool OopMapCache::put_at(int i, OopMapCacheEntry* entry, OopMapCacheEntry* old) {
-  return Atomic::cmpxchg(entry, &_array[i % _size], old) == old;
+  return Atomic::cmpxchg(&_array[i % _size], old, entry) == old;
 }
 
 void OopMapCache::flush() {
@@ -564,7 +564,7 @@
   do {
     head = _old_entries;
     entry->_next = head;
-    success = Atomic::cmpxchg(entry, &_old_entries, head) == head;
+    success = Atomic::cmpxchg(&_old_entries, head, entry) == head;
   } while (!success);
 
   if (log_is_enabled(Debug, interpreter, oopmap)) {