< prev index next >
src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
Print this page
rev 7558 : 8048179: Early reclaim of large objects that are referenced by a few objects
Summary:
Reviewed-by:
rev 7559 : imported patch bengt-review
rev 7560 : [mq]: bengt-review2
*** 679,699 ****
// Since we may have deleted a from_card_cache entry from the RS, clear
// the FCC.
clear_fcc();
}
! bool OtherRegionsTable::occupancy_less_or_equal_than(size_t occ) const {
! guarantee(occ <= (size_t)G1RSetSparseRegionEntries,
! err_msg("Requested maximum occupancy must be smaller or equal than "
! SIZE_FORMAT" but is " SIZE_FORMAT, (size_t)G1RSetSparseRegionEntries, occ));
! // The following statement is a simplification: although the predicate gives a
! // value for the maximum total allowed remembered set entries we always only
! // ever check the sparse remembered set for it.
! // Getting the actual occupancy of even a single fine remembered set (a single
! // coarse entry will almost always exceed the number the sparse remembered set can
! // hold so we just check for zero here) is very expensive, so we do not do it.
! return occ_coarse() == 0 && _first_all_fine_prts == NULL && occ_sparse() <= occ;
}
bool OtherRegionsTable::is_empty() const {
return occ_sparse() == 0 && occ_coarse() == 0 && _first_all_fine_prts == NULL;
}
--- 679,698 ----
// Since we may have deleted a from_card_cache entry from the RS, clear
// the FCC.
clear_fcc();
}
! bool OtherRegionsTable::occupancy_less_or_equal_than(size_t limit) const {
! if (limit <= (size_t)G1RSetSparseRegionEntries) {
! return occ_coarse() == 0 && _first_all_fine_prts == NULL && occ_sparse() <= limit;
! } else {
! // Current uses of this method may only use values less than G1RSetSparseRegionEntries
! // for the limit. The solution, comparing against occupied() would be too slow
! // at this time.
! Unimplemented();
! return false;
! }
}
bool OtherRegionsTable::is_empty() const {
return occ_sparse() == 0 && occ_coarse() == 0 && _first_all_fine_prts == NULL;
}
< prev index next >