--- old/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp 2019-11-21 11:55:23.629179987 +0100 +++ new/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp 2019-11-21 11:55:23.381175794 +0100 @@ -87,7 +87,7 @@ const int current_msgs = Atomic::load(&_messages); // OR the new message const int exchange_value = current_msgs | new_messages; - const int result = Atomic::cmpxchg(exchange_value, &_messages, current_msgs); + const int result = Atomic::cmpxchg(&_messages, current_msgs, exchange_value); if (result == current_msgs) { return; }