< prev index next >

src/hotspot/share/gc/g1/collectionSetChooser.cpp

Print this page

        

*** 195,205 **** // Only take the lock if we actually need to update the totals. if (region_num > 0) { assert(reclaimable_bytes > 0, "invariant"); // We could have just used atomics instead of taking the // lock. However, we currently don't have an atomic add for size_t. ! MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag); _end += region_num; _remaining_reclaimable_bytes += reclaimable_bytes; } else { assert(reclaimable_bytes == 0, "invariant"); } --- 195,205 ---- // Only take the lock if we actually need to update the totals. if (region_num > 0) { assert(reclaimable_bytes > 0, "invariant"); // We could have just used atomics instead of taking the // lock. However, we currently don't have an atomic add for size_t. ! MutexLocker x(ParGCRareEvent_lock); _end += region_num; _remaining_reclaimable_bytes += reclaimable_bytes; } else { assert(reclaimable_bytes == 0, "invariant"); }
< prev index next >