--- old/src/hotspot/share/runtime/threadSMR.inline.hpp 2019-11-21 11:58:32.688374169 +0100 +++ new/src/hotspot/share/runtime/threadSMR.inline.hpp 2019-11-21 11:58:32.200365929 +0100 @@ -56,7 +56,7 @@ // they are called by public inline update_tlh_stats() below: inline void ThreadsSMRSupport::add_tlh_times(uint add_value) { - Atomic::add(add_value, &_tlh_times); + Atomic::add(&_tlh_times, add_value); } inline void ThreadsSMRSupport::inc_tlh_cnt() { @@ -70,7 +70,7 @@ // No need to update max value so we're done. break; } - if (Atomic::cmpxchg(new_value, &_tlh_time_max, cur_value) == cur_value) { + if (Atomic::cmpxchg(&_tlh_time_max, cur_value, new_value) == cur_value) { // Updated max value so we're done. Otherwise try it all again. break; }