373 374 inline HeapWord* 375 ParMarkBitMap::find_obj_end(HeapWord* beg, HeapWord* end) const 376 { 377 const idx_t beg_bit = addr_to_bit(beg); 378 const idx_t end_bit = addr_to_bit(end); 379 const idx_t search_end = BitMap::word_align_up(end_bit); 380 const idx_t res_bit = MIN2(find_obj_end(beg_bit, search_end), end_bit); 381 return bit_to_addr(res_bit); 382 } 383 384 #ifdef ASSERT 385 inline void ParMarkBitMap::verify_bit(idx_t bit) const { 386 // Allow one past the last valid bit; useful for loop bounds. 387 assert(bit <= _beg_bits.size(), "bit out of range"); 388 } 389 390 inline void ParMarkBitMap::verify_addr(HeapWord* addr) const { 391 // Allow one past the last valid address; useful for loop bounds. 392 assert(addr >= region_start(), 393 err_msg("addr too small, addr: " PTR_FORMAT " region start: " PTR_FORMAT, p2i(addr), p2i(region_start()))); 394 assert(addr <= region_end(), 395 err_msg("addr too big, addr: " PTR_FORMAT " region end: " PTR_FORMAT, p2i(addr), p2i(region_end()))); 396 } 397 #endif // #ifdef ASSERT 398 399 #endif // SHARE_VM_GC_PARALLEL_PARMARKBITMAP_HPP | 373 374 inline HeapWord* 375 ParMarkBitMap::find_obj_end(HeapWord* beg, HeapWord* end) const 376 { 377 const idx_t beg_bit = addr_to_bit(beg); 378 const idx_t end_bit = addr_to_bit(end); 379 const idx_t search_end = BitMap::word_align_up(end_bit); 380 const idx_t res_bit = MIN2(find_obj_end(beg_bit, search_end), end_bit); 381 return bit_to_addr(res_bit); 382 } 383 384 #ifdef ASSERT 385 inline void ParMarkBitMap::verify_bit(idx_t bit) const { 386 // Allow one past the last valid bit; useful for loop bounds. 387 assert(bit <= _beg_bits.size(), "bit out of range"); 388 } 389 390 inline void ParMarkBitMap::verify_addr(HeapWord* addr) const { 391 // Allow one past the last valid address; useful for loop bounds. 392 assert(addr >= region_start(), 393 "addr too small, addr: " PTR_FORMAT " region start: " PTR_FORMAT, p2i(addr), p2i(region_start())); 394 assert(addr <= region_end(), 395 "addr too big, addr: " PTR_FORMAT " region end: " PTR_FORMAT, p2i(addr), p2i(region_end())); 396 } 397 #endif // #ifdef ASSERT 398 399 #endif // SHARE_VM_GC_PARALLEL_PARMARKBITMAP_HPP |