Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp @ 7181:2fc0334f613a
7194633: G1: Assertion and guarantee failures in block offset table
Summary: Add detailed error messages to assertions and guarantees in G1's block offset table.
Reviewed-by: ysr, brutisso
author | johnc |
---|---|
date | Tue, 27 Nov 2012 14:11:37 -0800 |
parents | da91efe96a93 |
children | 78bbf4d43a14 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp Tue Nov 27 14:20:21 2012 +0100 +++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp Tue Nov 27 14:11:37 2012 -0800 @@ -49,16 +49,17 @@ char* pc = (char*)p; assert(pc >= (char*)_reserved.start() && pc < (char*)_reserved.end(), - "p not in range."); + err_msg("p (" PTR_FORMAT ") not in reserved [" PTR_FORMAT ", " PTR_FORMAT ")", + p, (char*)_reserved.start(), (char*)_reserved.end())); size_t delta = pointer_delta(pc, _reserved.start(), sizeof(char)); size_t result = delta >> LogN; - assert(result < _vs.committed_size(), "bad index from address"); + check_index(result, "bad index from address"); return result; } inline HeapWord* G1BlockOffsetSharedArray::address_for_index(size_t index) const { - assert(index < _vs.committed_size(), "bad index"); + check_index(index, "index out of range"); HeapWord* result = _reserved.start() + (index << LogN_words); assert(result >= _reserved.start() && result < _reserved.end(), err_msg("bad address from index result " PTR_FORMAT