src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp
--- 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);