< prev index next >

src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page
rev 7696 : 8030646: track collection set membership in one place

@@ -6070,11 +6070,11 @@
     rs_lengths += cur->rem_set()->occupied_locked();
 
     HeapRegion* next = cur->next_in_collection_set();
     assert(cur->in_collection_set(), "bad CS");
     cur->set_next_in_collection_set(NULL);
-    cur->set_in_collection_set(false);
+    clear_in_cset_fast_test(cur);
 
     if (cur->is_young()) {
       int index = cur->young_index_in_cset();
       assert(index != -1, "invariant");
       assert((uint) index < policy->young_cset_region_length(), "invariant");

@@ -6296,11 +6296,11 @@
 
   while (cur != NULL) {
     HeapRegion* next = cur->next_in_collection_set();
     assert(cur->in_collection_set(), "bad CS");
     cur->set_next_in_collection_set(NULL);
-    cur->set_in_collection_set(false);
+    clear_in_cset_fast_test(cur);
     cur->set_young_index_in_cset(-1);
     cur = next;
   }
 }
 
< prev index next >