Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/heapRegionSets.cpp @ 3777:e8b0b0392037
7046182: G1: remove unnecessary iterations over the collection set
Summary: Remove two unnecessary iterations over the collection set which are supposed to prepare the RSet's of the CSet regions for parallel iterations (we'll make sure this is done incrementally). I'll piggyback on this CR the removal of the G1_REM_SET_LOGGING code.
Reviewed-by: brutisso, johnc
author | tonyp |
---|---|
date | Tue, 21 Jun 2011 15:23:07 -0400 |
parents | 1216415d8e35 |
children | 8aae2050e83e |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegionSets.cpp Mon Jun 20 22:03:13 2011 -0400 +++ b/src/share/vm/gc_implementation/g1/heapRegionSets.cpp Tue Jun 21 15:23:07 2011 -0400 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "gc_implementation/g1/heapRegionRemSet.hpp" #include "gc_implementation/g1/heapRegionSets.hpp" //////////////////// FreeRegionList //////////////////// @@ -38,6 +39,16 @@ //////////////////// MasterFreeRegionList //////////////////// +const char* MasterFreeRegionList::verify_region_extra(HeapRegion* hr) { + // We should reset the RSet for parallel iteration before we add it + // to the master free list so that it is ready when the region is + // re-allocated. + if (!hr->rem_set()->verify_ready_for_par_iteration()) { + return "the region's RSet should be ready for parallel iteration"; + } + return FreeRegionList::verify_region_extra(hr); +} + bool MasterFreeRegionList::check_mt_safety() { // Master Free List MT safety protocol: // (a) If we're at a safepoint, operations on the master free list