194 |
194 |
195 #define check_mark(addr) \ |
195 #define check_mark(addr) \ |
196 assert(_bmStartWord <= (addr) && (addr) < (_bmStartWord + _bmWordSize), \ |
196 assert(_bmStartWord <= (addr) && (addr) < (_bmStartWord + _bmWordSize), \ |
197 "outside underlying space?"); \ |
197 "outside underlying space?"); \ |
198 assert(G1CollectedHeap::heap()->is_in_exact(addr), \ |
198 assert(G1CollectedHeap::heap()->is_in_exact(addr), \ |
199 err_msg("Trying to access not available bitmap "PTR_FORMAT \ |
199 err_msg("Trying to access not available bitmap " PTR_FORMAT \ |
200 " corresponding to "PTR_FORMAT" (%u)", \ |
200 " corresponding to " PTR_FORMAT " (%u)", \ |
201 p2i(this), p2i(addr), G1CollectedHeap::heap()->addr_to_region(addr))); |
201 p2i(this), p2i(addr), G1CollectedHeap::heap()->addr_to_region(addr))); |
202 |
202 |
203 inline void CMBitMap::mark(HeapWord* addr) { |
203 inline void CMBitMap::mark(HeapWord* addr) { |
204 check_mark(addr); |
204 check_mark(addr); |
205 _bm.set_bit(heapWordToOffset(addr)); |
205 _bm.set_bit(heapWordToOffset(addr)); |
341 } |
341 } |
342 } |
342 } |
343 |
343 |
344 inline void CMTask::deal_with_reference(oop obj) { |
344 inline void CMTask::deal_with_reference(oop obj) { |
345 if (_cm->verbose_high()) { |
345 if (_cm->verbose_high()) { |
346 gclog_or_tty->print_cr("[%u] we're dealing with reference = "PTR_FORMAT, |
346 gclog_or_tty->print_cr("[%u] we're dealing with reference = " PTR_FORMAT, |
347 _worker_id, p2i((void*) obj)); |
347 _worker_id, p2i((void*) obj)); |
348 } |
348 } |
349 |
349 |
350 increment_refs_reached(); |
350 increment_refs_reached(); |
351 |
351 |
390 // might not be in a consistent state (another thread might be in |
390 // might not be in a consistent state (another thread might be in |
391 // the process of copying it). So the best thing we can do is to |
391 // the process of copying it). So the best thing we can do is to |
392 // assert that word_size is under an upper bound which is its |
392 // assert that word_size is under an upper bound which is its |
393 // containing region's capacity. |
393 // containing region's capacity. |
394 assert(word_size * HeapWordSize <= hr->capacity(), |
394 assert(word_size * HeapWordSize <= hr->capacity(), |
395 err_msg("size: "SIZE_FORMAT" capacity: "SIZE_FORMAT" "HR_FORMAT, |
395 err_msg("size: " SIZE_FORMAT " capacity: " SIZE_FORMAT " " HR_FORMAT, |
396 word_size * HeapWordSize, hr->capacity(), |
396 word_size * HeapWordSize, hr->capacity(), |
397 HR_FORMAT_PARAMS(hr))); |
397 HR_FORMAT_PARAMS(hr))); |
398 |
398 |
399 if (addr < hr->next_top_at_mark_start()) { |
399 if (addr < hr->next_top_at_mark_start()) { |
400 if (!_nextMarkBitMap->isMarked(addr)) { |
400 if (!_nextMarkBitMap->isMarked(addr)) { |