hotspot/src/share/vm/memory/cardTableModRefBS.cpp
changeset 29805 398335f2abed
parent 29325 0e86e64c66e5
child 30147 af9a41999c6e
--- a/hotspot/src/share/vm/memory/cardTableModRefBS.cpp	Tue Mar 31 11:27:20 2015 +0200
+++ b/hotspot/src/share/vm/memory/cardTableModRefBS.cpp	Tue Mar 31 11:29:21 2015 +0200
@@ -470,13 +470,9 @@
       fatal("Parallel gc not supported here.");
 #endif // INCLUDE_ALL_GCS
     } else {
-      // We do not call the non_clean_card_iterate_serial() version below because
-      // we want to clear the cards (which non_clean_card_iterate_serial() does not
-      // do for us): clear_cl here does the work of finding contiguous dirty ranges
-      // of cards to process and clear.
+      // clear_cl finds contiguous dirty ranges of cards to process and clear.
 
-      DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(),
-                                                       cl->gen_boundary());
+      DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(), cl->gen_boundary());
       ClearNoncleanCardWrapper clear_cl(dcto_cl, ct);
 
       clear_cl.do_MemRegion(mr);
@@ -484,46 +480,6 @@
   }
 }
 
-// The iterator itself is not MT-aware, but
-// MT-aware callers and closures can use this to
-// accomplish dirty card iteration in parallel. The
-// iterator itself does not clear the dirty cards, or
-// change their values in any manner.
-void CardTableModRefBS::non_clean_card_iterate_serial(MemRegion mr,
-                                                      MemRegionClosure* cl) {
-  bool is_par = (SharedHeap::heap()->n_par_threads() > 0);
-  assert(!is_par ||
-          (SharedHeap::heap()->n_par_threads() ==
-          SharedHeap::heap()->workers()->active_workers()), "Mismatch");
-  for (int i = 0; i < _cur_covered_regions; i++) {
-    MemRegion mri = mr.intersection(_covered[i]);
-    if (mri.word_size() > 0) {
-      jbyte* cur_entry = byte_for(mri.last());
-      jbyte* limit = byte_for(mri.start());
-      while (cur_entry >= limit) {
-        jbyte* next_entry = cur_entry - 1;
-        if (*cur_entry != clean_card) {
-          size_t non_clean_cards = 1;
-          // Should the next card be included in this range of dirty cards.
-          while (next_entry >= limit && *next_entry != clean_card) {
-            non_clean_cards++;
-            cur_entry = next_entry;
-            next_entry--;
-          }
-          // The memory region may not be on a card boundary.  So that
-          // objects beyond the end of the region are not processed, make
-          // cur_cards precise with regard to the end of the memory region.
-          MemRegion cur_cards(addr_for(cur_entry),
-                              non_clean_cards * card_size_in_words);
-          MemRegion dirty_region = cur_cards.intersection(mri);
-          cl->do_MemRegion(dirty_region);
-        }
-        cur_entry = next_entry;
-      }
-    }
-  }
-}
-
 void CardTableModRefBS::dirty_MemRegion(MemRegion mr) {
   assert((HeapWord*)align_size_down((uintptr_t)mr.start(), HeapWordSize) == mr.start(), "Unaligned start");
   assert((HeapWord*)align_size_up  ((uintptr_t)mr.end(),   HeapWordSize) == mr.end(),   "Unaligned end"  );