--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Wed Sep 28 10:36:31 2011 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Mon Oct 03 12:49:53 2011 -0700
@@ -210,44 +210,17 @@
HeapWord* top,
OopClosure* cl) {
G1CollectedHeap* g1h = _g1;
-
int oop_size;
-
- OopClosure* cl2 = cl;
+ OopClosure* cl2 = NULL;
- // If we are scanning the remembered sets looking for refs
- // into the collection set during an evacuation pause then
- // we will want to 'discover' reference objects that point
- // to referents in the collection set.
- //
- // Unfortunately it is an instance of FilterIntoCSClosure
- // that is iterated over the reference fields of oops in
- // mr (and not the G1ParPushHeapRSClosure - which is the
- // cl parameter).
- // If we set the _ref_processor field in the FilterIntoCSClosure
- // instance, all the reference objects that are walked
- // (regardless of whether their referent object's are in
- // the cset) will be 'discovered'.
- //
- // The G1STWIsAlive closure considers a referent object that
- // is outside the cset as alive. The G1CopyingKeepAliveClosure
- // skips referents that are not in the cset.
- //
- // Therefore reference objects in mr with a referent that is
- // outside the cset should be OK.
-
- ReferenceProcessor* rp = _cl->_ref_processor;
- if (rp != NULL) {
- assert(rp == _g1->ref_processor_stw(), "should be stw");
- assert(_fk == IntoCSFilterKind, "should be looking for refs into CS");
- }
-
- FilterIntoCSClosure intoCSFilt(this, g1h, cl, rp);
+ FilterIntoCSClosure intoCSFilt(this, g1h, cl);
FilterOutOfRegionClosure outOfRegionFilt(_hr, cl);
switch (_fk) {
+ case NoFilterKind: cl2 = cl; break;
case IntoCSFilterKind: cl2 = &intoCSFilt; break;
case OutOfRegionFilterKind: cl2 = &outOfRegionFilt; break;
+ default: ShouldNotReachHere();
}
// Start filtering what we add to the remembered set. If the object is
@@ -270,7 +243,7 @@
break;
case IntoCSFilterKind: {
- FilterIntoCSClosure filt(this, g1h, cl, rp);
+ FilterIntoCSClosure filt(this, g1h, cl);
bottom = walk_mem_region_loop(&filt, g1h, _hr, bottom, top);
break;
}