383 } |
383 } |
384 for (size_t card = first_card; card <= last_card; card += 1) { |
384 for (size_t card = first_card; card <= last_card; card += 1) { |
385 HeapWord* card_addr = _array->address_for_index(card); |
385 HeapWord* card_addr = _array->address_for_index(card); |
386 HeapWord* block_start = block_start_const(card_addr); |
386 HeapWord* block_start = block_start_const(card_addr); |
387 if (block_start != obj_start) { |
387 if (block_start != obj_start) { |
388 gclog_or_tty->print_cr("block start: "PTR_FORMAT" is incorrect - " |
388 gclog_or_tty->print_cr("block start: " PTR_FORMAT " is incorrect - " |
389 "card index: "SIZE_FORMAT" " |
389 "card index: " SIZE_FORMAT " " |
390 "card addr: "PTR_FORMAT" BOT entry: %u " |
390 "card addr: " PTR_FORMAT " BOT entry: %u " |
391 "obj: "PTR_FORMAT" word size: "SIZE_FORMAT" " |
391 "obj: " PTR_FORMAT " word size: " SIZE_FORMAT " " |
392 "cards: ["SIZE_FORMAT","SIZE_FORMAT"]", |
392 "cards: [" SIZE_FORMAT "," SIZE_FORMAT "]", |
393 block_start, card, card_addr, |
393 block_start, card, card_addr, |
394 _array->offset_array(card), |
394 _array->offset_array(card), |
395 obj_start, word_size, first_card, last_card); |
395 obj_start, word_size, first_card, last_card); |
396 return false; |
396 return false; |
397 } |
397 } |
402 #ifndef PRODUCT |
402 #ifndef PRODUCT |
403 void |
403 void |
404 G1BlockOffsetArray::print_on(outputStream* out) { |
404 G1BlockOffsetArray::print_on(outputStream* out) { |
405 size_t from_index = _array->index_for(_bottom); |
405 size_t from_index = _array->index_for(_bottom); |
406 size_t to_index = _array->index_for(_end); |
406 size_t to_index = _array->index_for(_end); |
407 out->print_cr(">> BOT for area ["PTR_FORMAT","PTR_FORMAT") " |
407 out->print_cr(">> BOT for area [" PTR_FORMAT "," PTR_FORMAT ") " |
408 "cards ["SIZE_FORMAT","SIZE_FORMAT")", |
408 "cards [" SIZE_FORMAT "," SIZE_FORMAT ")", |
409 _bottom, _end, from_index, to_index); |
409 _bottom, _end, from_index, to_index); |
410 for (size_t i = from_index; i < to_index; ++i) { |
410 for (size_t i = from_index; i < to_index; ++i) { |
411 out->print_cr(" entry "SIZE_FORMAT_W(8)" | "PTR_FORMAT" : %3u", |
411 out->print_cr(" entry " SIZE_FORMAT_W(8) " | " PTR_FORMAT " : %3u", |
412 i, _array->address_for_index(i), |
412 i, _array->address_for_index(i), |
413 (uint) _array->offset_array(i)); |
413 (uint) _array->offset_array(i)); |
414 } |
414 } |
415 } |
415 } |
416 #endif // !PRODUCT |
416 #endif // !PRODUCT |
486 |
486 |
487 #ifndef PRODUCT |
487 #ifndef PRODUCT |
488 void |
488 void |
489 G1BlockOffsetArrayContigSpace::print_on(outputStream* out) { |
489 G1BlockOffsetArrayContigSpace::print_on(outputStream* out) { |
490 G1BlockOffsetArray::print_on(out); |
490 G1BlockOffsetArray::print_on(out); |
491 out->print_cr(" next offset threshold: "PTR_FORMAT, _next_offset_threshold); |
491 out->print_cr(" next offset threshold: " PTR_FORMAT, _next_offset_threshold); |
492 out->print_cr(" next offset index: "SIZE_FORMAT, _next_offset_index); |
492 out->print_cr(" next offset index: " SIZE_FORMAT, _next_offset_index); |
493 } |
493 } |
494 #endif // !PRODUCT |
494 #endif // !PRODUCT |