diff -r e92153ed8bdc -r 29b0d0b61615 src/hotspot/share/compiler/compileBroker.cpp --- a/src/hotspot/share/compiler/compileBroker.cpp Mon Nov 25 12:30:24 2019 +0100 +++ b/src/hotspot/share/compiler/compileBroker.cpp Mon Nov 25 12:31:39 2019 +0100 @@ -1479,14 +1479,14 @@ assert(!is_osr, "can't be osr"); // Adapters, native wrappers and method handle intrinsics // should be generated always. - return Atomic::add(1, &_compilation_id); + return Atomic::add(&_compilation_id, 1); } else if (CICountOSR && is_osr) { - id = Atomic::add(1, &_osr_compilation_id); + id = Atomic::add(&_osr_compilation_id, 1); if (CIStartOSR <= id && id < CIStopOSR) { return id; } } else { - id = Atomic::add(1, &_compilation_id); + id = Atomic::add(&_compilation_id, 1); if (CIStart <= id && id < CIStop) { return id; } @@ -1498,7 +1498,7 @@ #else // CICountOSR is a develop flag and set to 'false' by default. In a product built, // only _compilation_id is incremented. - return Atomic::add(1, &_compilation_id); + return Atomic::add(&_compilation_id, 1); #endif }