< prev index next >

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

Print this page
rev 9605 : imported patch in-cset-ext

@@ -88,10 +88,12 @@
 
       _par_scan_state->push_on_queue(p);
     } else {
       if (state.is_humongous()) {
         _g1->set_humongous_is_live(obj);
+      } else if (state.is_ext()) {
+        _par_scan_state->do_oop_ext(p);
       }
       _par_scan_state->update_rs(_from, p, obj);
     }
   }
 }

@@ -100,16 +102,19 @@
 inline void G1ParPushHeapRSClosure::do_oop_nv(T* p) {
   T heap_oop = oopDesc::load_heap_oop(p);
 
   if (!oopDesc::is_null(heap_oop)) {
     oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
-    if (_g1->is_in_cset_or_humongous(obj)) {
+    const InCSetState state = _g1->in_cset_state(obj);
+    if (state.is_in_cset_or_humongous()) {
       Prefetch::write(obj->mark_addr(), 0);
       Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
 
       // Place on the references queue
       _par_scan_state->push_on_queue(p);
+    } else if (state.is_ext()) {
+      _par_scan_state->do_oop_ext(p);
     } else {
       assert(!_g1->obj_in_cs(obj), "checking");
     }
   }
 }

@@ -247,13 +252,13 @@
   // well-formed. So we have to read its size from its from-space
   // image which we know should not be changing.
   _cm->grayRoot(to_obj, (size_t) from_obj->size(), _worker_id);
 }
 
-template <G1Barrier barrier, G1Mark do_mark_object>
+template <G1Barrier barrier, G1Mark do_mark_object, bool use_ext>
 template <class T>
-void G1ParCopyClosure<barrier, do_mark_object>::do_oop_nv(T* p) {
+void G1ParCopyClosure<barrier, do_mark_object, use_ext>::do_oop_nv(T* p) {
   T heap_oop = oopDesc::load_heap_oop(p);
 
   if (oopDesc::is_null(heap_oop)) {
     return;
   }

@@ -284,10 +289,14 @@
     }
   } else {
     if (state.is_humongous()) {
       _g1->set_humongous_is_live(obj);
     }
+
+    if (use_ext && state.is_ext()) {
+      _par_scan_state->do_oop_ext(p);
+    }
     // The object is not in collection set. If we're a root scanning
     // closure during an initial mark pause then attempt to mark the object.
     if (do_mark_object == G1MarkFromRoot) {
       mark_object(obj);
     }
< prev index next >