--- a/src/hotspot/share/utilities/globalCounter.cpp Mon Nov 25 12:30:24 2019 +0100
+++ b/src/hotspot/share/utilities/globalCounter.cpp Mon Nov 25 12:31:39 2019 +0100
@@ -59,7 +59,7 @@
void GlobalCounter::write_synchronize() {
assert((*Thread::current()->get_rcu_counter() & COUNTER_ACTIVE) == 0x0, "must be outside a critcal section");
// Atomic::add must provide fence since we have storeload dependency.
- uintx gbl_cnt = Atomic::add(COUNTER_INCREMENT, &_global_counter._counter);
+ uintx gbl_cnt = Atomic::add(&_global_counter._counter, COUNTER_INCREMENT);
// Do all RCU threads.
CounterThreadCheck ctc(gbl_cnt);