--- old/src/hotspot/share/gc/z/zStat.cpp 2019-11-21 11:55:20.665129876 +0100 +++ new/src/hotspot/share/gc/z/zStat.cpp 2019-11-21 11:55:20.405125480 +0100 @@ -772,7 +772,7 @@ } const uint64_t new_max = value; - const uint64_t prev_max = Atomic::cmpxchg(new_max, &cpu_data->_max, max); + const uint64_t prev_max = Atomic::cmpxchg(&cpu_data->_max, max, new_max); if (prev_max == max) { // Success break;