comparison 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
comparison
equal deleted inserted replaced
0:a45e2698295e 1:e50adfaaca47
42 _covered = heap; 42 _covered = heap;
43 43
44 _bm = BitMapView((BitMap::bm_word_t*) storage.start(), _covered.word_size() >> _shifter); 44 _bm = BitMapView((BitMap::bm_word_t*) storage.start(), _covered.word_size() >> _shifter);
45 } 45 }
46 46
47 void MarkBitMap::clear_range(MemRegion mr) { 47 void MarkBitMap::do_clear(MemRegion mr, bool large) {
48 MemRegion intersection = mr.intersection(_covered); 48 MemRegion intersection = mr.intersection(_covered);
49 assert(!intersection.is_empty(), 49 assert(!intersection.is_empty(),
50 "Given range from " PTR_FORMAT " to " PTR_FORMAT " is completely outside the heap", 50 "Given range from " PTR_FORMAT " to " PTR_FORMAT " is completely outside the heap",
51 p2i(mr.start()), p2i(mr.end())); 51 p2i(mr.start()), p2i(mr.end()));
52 // convert address range into offset range 52 // convert address range into offset range
53 _bm.at_put_range(addr_to_offset(intersection.start()), 53 size_t beg = addr_to_offset(intersection.start());
54 addr_to_offset(intersection.end()), false); 54 size_t end = addr_to_offset(intersection.end());
55 if (large) {
56 _bm.clear_large_range(beg, end);
57 } else {
58 _bm.clear_range(beg, end);
59 }
55 } 60 }
56 61
57 #ifdef ASSERT 62 #ifdef ASSERT
58 void MarkBitMap::check_mark(HeapWord* addr) { 63 void MarkBitMap::check_mark(HeapWord* addr) {
59 assert(Universe::heap()->is_in_reserved(addr), 64 assert(Universe::heap()->is_in_reserved(addr),