diff src/hotspot/share/gc/shared/markBitMap.cpp @ 53545:5b87d3fc1093

8213373: Bulk MarkBitMap clearing methods Reviewed-by: rkennke, zgu
author shade
date Thu, 15 Nov 2018 21:05:47 +0100
parents 31b159f30fb2
children ebf733a324d4
line wrap: on
line diff
--- a/src/hotspot/share/gc/shared/markBitMap.cpp	Tue Nov 13 22:08:44 2018 -0800
+++ b/src/hotspot/share/gc/shared/markBitMap.cpp	Thu Nov 15 21:05:47 2018 +0100
@@ -44,14 +44,19 @@
   _bm = BitMapView((BitMap::bm_word_t*) storage.start(), _covered.word_size() >> _shifter);
 }
 
-void MarkBitMap::clear_range(MemRegion mr) {
+void MarkBitMap::do_clear(MemRegion mr, bool large) {
   MemRegion intersection = mr.intersection(_covered);
   assert(!intersection.is_empty(),
          "Given range from " PTR_FORMAT " to " PTR_FORMAT " is completely outside the heap",
          p2i(mr.start()), p2i(mr.end()));
   // convert address range into offset range
-  _bm.at_put_range(addr_to_offset(intersection.start()),
-                   addr_to_offset(intersection.end()), false);
+  size_t beg = addr_to_offset(intersection.start());
+  size_t end = addr_to_offset(intersection.end());
+  if (large) {
+    _bm.clear_large_range(beg, end);
+  } else {
+    _bm.clear_range(beg, end);
+  }
 }
 
 #ifdef ASSERT