--- old/src/hotspot/share/gc/g1/g1FullGCAdjustTask.cpp 2019-11-21 11:52:59.414758425 +0100 +++ new/src/hotspot/share/gc/g1/g1FullGCAdjustTask.cpp 2019-11-21 11:52:59.158754243 +0100 @@ -101,7 +101,7 @@ // Adjust the weak roots. - if (Atomic::add(1u, &_references_done) == 1u) { // First incr claims task. + if (Atomic::add(&_references_done, 1u) == 1u) { // First incr claims task. G1CollectedHeap::heap()->ref_processor_stw()->weak_oops_do(&_adjust); }