--- old/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.cpp 2019-11-21 11:53:00.650778616 +0100 +++ new/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.cpp 2019-11-21 11:53:00.394774434 +0100 @@ -129,7 +129,7 @@ void G1RedirtyCardsQueueSet::enqueue_completed_buffer(BufferNode* node) { assert(_collecting, "precondition"); - Atomic::add(buffer_size() - node->index(), &_entry_count); + Atomic::add(&_entry_count, buffer_size() - node->index()); _list.push(*node); update_tail(node); } @@ -139,7 +139,7 @@ const G1BufferNodeList from = src->take_all_completed_buffers(); if (from._head != NULL) { assert(from._tail != NULL, "invariant"); - Atomic::add(from._entry_count, &_entry_count); + Atomic::add(&_entry_count, from._entry_count); _list.prepend(*from._head, *from._tail); update_tail(from._tail); }