< prev index next >

src/share/vm/gc/g1/g1OopClosures.inline.hpp

Print this page
rev 13170 : [mq]: 8183397-consistent-closure-filtering

@@ -76,12 +76,14 @@
   oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
   const InCSetState state = _g1->in_cset_state(obj);
   if (state.is_in_cset()) {
     prefetch_and_push(p, obj);
   } else {
+    if (HeapRegion::is_in_same_region(p, obj)) {
+      return;
+    }
     handle_non_cset_obj_common(state, p, obj);
-
     _par_scan_state->update_rs(_from, p, obj);
   }
 }
 
 template <class T>

@@ -169,13 +171,11 @@
   } else {
     HeapRegion* to = _g1->heap_region_containing(obj);
     if (_from == to) {
       return;
     }
-
     handle_non_cset_obj_common(state, p, obj);
-
     to->rem_set()->add_reference(p, _worker_i);
   }
 }
 
 template <class T>

@@ -188,10 +188,13 @@
 
   const InCSetState state = _g1->in_cset_state(obj);
   if (state.is_in_cset()) {
     prefetch_and_push(p, obj);
   } else {
+    if (HeapRegion::is_in_same_region(p, obj)) {
+      return;
+    }
     handle_non_cset_obj_common(state, p, obj);
   }
 }
 
 template <class T>
< prev index next >