src/hotspot/share/gc/z/zStat.cpp
changeset 59252 623722a6aeb9
parent 59251 4cbfa5077d68
--- a/src/hotspot/share/gc/z/zStat.cpp	Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/gc/z/zStat.cpp	Mon Nov 25 12:33:15 2019 +0100
@@ -772,7 +772,7 @@
     }
 
     const uint64_t new_max = value;
-    const uint64_t prev_max = Atomic::cmpxchg(new_max, &cpu_data->_max, max);
+    const uint64_t prev_max = Atomic::cmpxchg(&cpu_data->_max, max, new_max);
     if (prev_max == max) {
       // Success
       break;