equal
deleted
inserted
replaced
280 return candidate; |
280 return candidate; |
281 } |
281 } |
282 } |
282 } |
283 return NULL; |
283 return NULL; |
284 } |
284 } |
285 |
|
286 #ifdef ASSERT |
|
287 void OopStorage::assert_at_safepoint() { |
|
288 assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); |
|
289 } |
|
290 #endif // ASSERT |
|
291 |
285 |
292 ////////////////////////////////////////////////////////////////////////////// |
286 ////////////////////////////////////////////////////////////////////////////// |
293 // Allocation |
287 // Allocation |
294 // |
288 // |
295 // Allocation involves the _allocate_list, which contains a subset of the |
289 // Allocation involves the _allocate_list, which contains a subset of the |
726 _storage->_concurrent_iteration_active = value; |
720 _storage->_concurrent_iteration_active = value; |
727 } |
721 } |
728 } |
722 } |
729 |
723 |
730 void OopStorage::BasicParState::ensure_iteration_started() { |
724 void OopStorage::BasicParState::ensure_iteration_started() { |
731 if (!_concurrent) assert_at_safepoint(); |
725 if (!_concurrent) { |
|
726 assert_at_safepoint(); |
|
727 } |
732 assert(!_concurrent || _storage->_concurrent_iteration_active, "invariant"); |
728 assert(!_concurrent || _storage->_concurrent_iteration_active, "invariant"); |
733 // Ensure _next_block is not the not_started_marker, setting it to |
729 // Ensure _next_block is not the not_started_marker, setting it to |
734 // the _active_head to start the iteration if necessary. |
730 // the _active_head to start the iteration if necessary. |
735 if (OrderAccess::load_acquire(&_next_block) == not_started_marker) { |
731 if (OrderAccess::load_acquire(&_next_block) == not_started_marker) { |
736 Atomic::cmpxchg(_storage->_active_head, &_next_block, not_started_marker); |
732 Atomic::cmpxchg(_storage->_active_head, &_next_block, not_started_marker); |