543 p2i(q), p2i(_sp->end())));
544 index -= n_cards_back;
545 offset = _array->offset_array(index);
546 }
547 assert(offset < N_words, "offset too large");
548 index--;
549 q -= offset;
550 assert(q >= _sp->bottom(),
551 err_msg("q = " PTR_FORMAT " crossed below bottom = " PTR_FORMAT,
552 p2i(q), p2i(_sp->bottom())));
553 assert(q < _sp->end(),
554 err_msg("q = " PTR_FORMAT " crossed above end = " PTR_FORMAT,
555 p2i(q), p2i(_sp->end())));
556 HeapWord* n = q;
557
558 while (n <= addr) {
559 debug_only(HeapWord* last = q); // for debugging
560 q = n;
561 n += _sp->block_size(n);
562 assert(n > q,
563 err_msg("Looping at n = " PTR_FORMAT " with last = " PTR_FORMAT","
564 " while querying blk_start(" PTR_FORMAT ")"
565 " on _sp = [" PTR_FORMAT "," PTR_FORMAT ")",
566 p2i(n), p2i(last), p2i(addr), p2i(_sp->bottom()), p2i(_sp->end())));
567 }
568 assert(q <= addr,
569 err_msg("wrong order for current (" INTPTR_FORMAT ")" " <= arg (" INTPTR_FORMAT ")",
570 p2i(q), p2i(addr)));
571 assert(addr <= n,
572 err_msg("wrong order for arg (" INTPTR_FORMAT ") <= next (" INTPTR_FORMAT ")",
573 p2i(addr), p2i(n)));
574 return q;
575 }
576
577 HeapWord* BlockOffsetArrayNonContigSpace::block_start_careful(
578 const void* addr) const {
579 assert(_array->offset_array(0) == 0, "objects can't cross covered areas");
580
581 assert(_bottom <= addr && addr < _end,
582 "addr must be covered by this Array");
583 // Must read this exactly once because it can be modified by parallel
|
543 p2i(q), p2i(_sp->end())));
544 index -= n_cards_back;
545 offset = _array->offset_array(index);
546 }
547 assert(offset < N_words, "offset too large");
548 index--;
549 q -= offset;
550 assert(q >= _sp->bottom(),
551 err_msg("q = " PTR_FORMAT " crossed below bottom = " PTR_FORMAT,
552 p2i(q), p2i(_sp->bottom())));
553 assert(q < _sp->end(),
554 err_msg("q = " PTR_FORMAT " crossed above end = " PTR_FORMAT,
555 p2i(q), p2i(_sp->end())));
556 HeapWord* n = q;
557
558 while (n <= addr) {
559 debug_only(HeapWord* last = q); // for debugging
560 q = n;
561 n += _sp->block_size(n);
562 assert(n > q,
563 err_msg("Looping at n = " PTR_FORMAT " with last = " PTR_FORMAT ","
564 " while querying blk_start(" PTR_FORMAT ")"
565 " on _sp = [" PTR_FORMAT "," PTR_FORMAT ")",
566 p2i(n), p2i(last), p2i(addr), p2i(_sp->bottom()), p2i(_sp->end())));
567 }
568 assert(q <= addr,
569 err_msg("wrong order for current (" INTPTR_FORMAT ")" " <= arg (" INTPTR_FORMAT ")",
570 p2i(q), p2i(addr)));
571 assert(addr <= n,
572 err_msg("wrong order for arg (" INTPTR_FORMAT ") <= next (" INTPTR_FORMAT ")",
573 p2i(addr), p2i(n)));
574 return q;
575 }
576
577 HeapWord* BlockOffsetArrayNonContigSpace::block_start_careful(
578 const void* addr) const {
579 assert(_array->offset_array(0) == 0, "objects can't cross covered areas");
580
581 assert(_bottom <= addr && addr < _end,
582 "addr must be covered by this Array");
583 // Must read this exactly once because it can be modified by parallel
|