--- old/src/hotspot/share/runtime/threadSMR.cpp 2019-11-21 11:58:32.004362620 +0100 +++ new/src/hotspot/share/runtime/threadSMR.cpp 2019-11-21 11:58:31.476353704 +0100 @@ -134,7 +134,7 @@ // 'inline' functions first so the definitions are before first use: inline void ThreadsSMRSupport::add_deleted_thread_times(uint add_value) { - Atomic::add(add_value, &_deleted_thread_times); + Atomic::add(&_deleted_thread_times, add_value); } inline void ThreadsSMRSupport::inc_deleted_thread_cnt() { @@ -156,7 +156,7 @@ // No need to update max value so we're done. break; } - if (Atomic::cmpxchg(new_value, &_deleted_thread_time_max, cur_value) == cur_value) { + if (Atomic::cmpxchg(&_deleted_thread_time_max, cur_value, new_value) == cur_value) { // Updated max value so we're done. Otherwise try it all again. break; } @@ -170,7 +170,7 @@ } inline ThreadsList* ThreadsSMRSupport::xchg_java_thread_list(ThreadsList* new_list) { - return (ThreadsList*)Atomic::xchg(new_list, &_java_thread_list); + return (ThreadsList*)Atomic::xchg(&_java_thread_list, new_list); } // Hash table of pointers found by a scan. Used for collecting hazard