// 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, seqnum, seqnum_initializing) == seqnum)) { // Reset marking information
_live_bytes = 0;
_live_objects = 0;
// 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) { // Count contention once
ZStatInc(ZCounterMarkSeqNumResetContention);
contention = true;
if (!claim_segment(segment)) { // Already claimed, wait for live bit to be set while (!is_segment_live(segment)) { // Mark reset contention if (!contention) { // Count contention once
ZStatInc(ZCounterMarkSegmentResetContention);
contention = true;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.