< prev index next >

src/hotspot/share/gc/z/zLiveMap.cpp

Print this page

        

*** 52,64 **** const uint32_t seqnum_initializing = (uint32_t)-1; bool contention = false; // Multiple threads can enter here, make sure only one of them // resets the marking information while the others busy wait. ! for (uint32_t seqnum = OrderAccess::load_acquire(&_seqnum); seqnum != ZGlobalSeqNum; ! seqnum = OrderAccess::load_acquire(&_seqnum)) { if ((seqnum != seqnum_initializing) && (Atomic::cmpxchg(seqnum_initializing, &_seqnum, seqnum) == seqnum)) { // Reset marking information _live_bytes = 0; _live_objects = 0; --- 52,64 ---- const uint32_t seqnum_initializing = (uint32_t)-1; bool contention = false; // Multiple threads can enter here, make sure only one of them // resets the marking information while the others busy wait. ! for (uint32_t seqnum = Atomic::load_acquire(&_seqnum); seqnum != ZGlobalSeqNum; ! seqnum = Atomic::load_acquire(&_seqnum)) { if ((seqnum != seqnum_initializing) && (Atomic::cmpxchg(seqnum_initializing, &_seqnum, seqnum) == seqnum)) { // Reset marking information _live_bytes = 0; _live_objects = 0;
*** 71,81 **** // Make sure the newly reset marking information is ordered // before the update of the page seqnum, such that when the // up-to-date seqnum is load acquired, the bit maps will not // contain stale information. ! OrderAccess::release_store(&_seqnum, ZGlobalSeqNum); break; } // Mark reset contention if (!contention) { --- 71,81 ---- // Make sure the newly reset marking information is ordered // before the update of the page seqnum, such that when the // up-to-date seqnum is load acquired, the bit maps will not // contain stale information. ! Atomic::release_store(&_seqnum, ZGlobalSeqNum); break; } // Mark reset contention if (!contention) {
< prev index next >