src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp
changeset 59252 623722a6aeb9
parent 58966 6c6cce0f149d
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp	Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp	Mon Nov 25 12:33:15 2019 +0100
@@ -62,7 +62,7 @@
   do {
     const jbyte current = *dest;
     const jbyte new_value = op(current, bits);
-    if (Atomic::cmpxchg(new_value, dest, current) == current) {
+    if (Atomic::cmpxchg(dest, current, new_value) == current) {
       return;
     }
   } while (true);