diff src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @ 23024:cbc7c4c9e11c

8048179: Early reclaim of large objects that are referenced by a few objects Summary: Push the remembered sets of large objects with few referenced into the dirty card queue at the beginning of the evacuation so that they may end up with zero remembered set entries at the end of the collection, and are potentially reclaimed. Also improve timing measurements of the early reclaim mechanism, and shorten flag names. Reviewed-by: brutisso, jmasa, dfazunen
author tschatzl
date Wed, 07 Jan 2015 15:15:37 +0100
parents 7baf47cb97cb
children dd9cc155639c 71f6bbeb6026
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Fri May 15 06:47:56 2015 +0000
+++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Wed Jan 07 15:15:37 2015 +0100
@@ -694,6 +694,18 @@
   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;
 }