src/share/vm/memory/blockOffsetTable.cpp

changeset 2891
7d64aa23eb96
parent 2314
f95d63e2154a
child 2943
537a4053b0f9
     1.1 --- a/src/share/vm/memory/blockOffsetTable.cpp	Tue May 10 12:26:10 2011 -0700
     1.2 +++ b/src/share/vm/memory/blockOffsetTable.cpp	Wed May 11 15:47:12 2011 -0700
     1.3 @@ -541,20 +541,33 @@
     1.4      // to go back by.
     1.5      size_t n_cards_back = entry_to_cards_back(offset);
     1.6      q -= (N_words * n_cards_back);
     1.7 -    assert(q >= _sp->bottom(), "Went below bottom!");
     1.8 +    assert(q >= _sp->bottom(),
     1.9 +           err_msg("q = " PTR_FORMAT " crossed below bottom = " PTR_FORMAT,
    1.10 +                   q, _sp->bottom()));
    1.11 +    assert(q < _sp->end(),
    1.12 +           err_msg("q = " PTR_FORMAT " crossed above end = " PTR_FORMAT,
    1.13 +                   q, _sp->end()));
    1.14      index -= n_cards_back;
    1.15      offset = _array->offset_array(index);
    1.16    }
    1.17    assert(offset < N_words, "offset too large");
    1.18    index--;
    1.19    q -= offset;
    1.20 +  assert(q >= _sp->bottom(),
    1.21 +         err_msg("q = " PTR_FORMAT " crossed below bottom = " PTR_FORMAT,
    1.22 +                 q, _sp->bottom()));
    1.23 +  assert(q < _sp->end(),
    1.24 +         err_msg("q = " PTR_FORMAT " crossed above end = " PTR_FORMAT,
    1.25 +                 q, _sp->end()));
    1.26    HeapWord* n = q;
    1.27  
    1.28    while (n <= addr) {
    1.29      debug_only(HeapWord* last = q);   // for debugging
    1.30      q = n;
    1.31      n += _sp->block_size(n);
    1.32 -    assert(n > q, err_msg("Looping at: " INTPTR_FORMAT, n));
    1.33 +    assert(n > q,
    1.34 +           err_msg("Looping at n = " PTR_FORMAT " with last = " PTR_FORMAT " _sp = [" PTR_FORMAT "," PTR_FORMAT ")",
    1.35 +                   n, last, _sp->bottom(), _sp->end()));
    1.36    }
    1.37    assert(q <= addr, err_msg("wrong order for current (" INTPTR_FORMAT ") <= arg (" INTPTR_FORMAT ")", q, addr));
    1.38    assert(addr <= n, err_msg("wrong order for arg (" INTPTR_FORMAT ") <= next (" INTPTR_FORMAT ")", addr, n));

mercurial