--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSets.cpp Mon Jun 20 22:03:13 2011 -0400
+++ b/hotspot/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