1.1 --- a/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Mon Jul 16 13:00:26 2012 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Tue Jul 17 11:52:10 2012 -0700 1.3 @@ -29,6 +29,7 @@ 1.4 #include "gc_implementation/g1/g1CollectedHeap.hpp" 1.5 #include "gc_implementation/g1/g1OopClosures.hpp" 1.6 #include "gc_implementation/g1/g1RemSet.hpp" 1.7 +#include "gc_implementation/g1/heapRegionRemSet.hpp" 1.8 1.9 /* 1.10 * This really ought to be an inline function, but apparently the C++ 1.11 @@ -182,6 +183,7 @@ 1.12 #endif // ASSERT 1.13 1.14 assert(_from != NULL, "from region must be non-NULL"); 1.15 + assert(_from->is_in_reserved(p), "p is not in from"); 1.16 1.17 HeapRegion* to = _g1->heap_region_containing(obj); 1.18 if (to != NULL && _from != to) { 1.19 @@ -212,14 +214,16 @@ 1.20 // or processed (if an evacuation failure occurs) at the end 1.21 // of the collection. 1.22 // See G1RemSet::cleanup_after_oops_into_collection_set_do(). 1.23 - } else { 1.24 - // We either don't care about pushing references that point into the 1.25 - // collection set (i.e. we're not during an evacuation pause) _or_ 1.26 - // the reference doesn't point into the collection set. Either way 1.27 - // we add the reference directly to the RSet of the region containing 1.28 - // the referenced object. 1.29 - _g1_rem_set->par_write_ref(_from, p, _worker_i); 1.30 + return; 1.31 } 1.32 + 1.33 + // We either don't care about pushing references that point into the 1.34 + // collection set (i.e. we're not during an evacuation pause) _or_ 1.35 + // the reference doesn't point into the collection set. Either way 1.36 + // we add the reference directly to the RSet of the region containing 1.37 + // the referenced object. 1.38 + assert(to->rem_set() != NULL, "Need per-region 'into' remsets."); 1.39 + to->rem_set()->add_reference(p, _worker_i); 1.40 } 1.41 } 1.42