mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8080775: Better argument formatting for assert() and friends
Reviewed-by: kbarrett, pliden
This commit is contained in:
parent
aa0818a98a
commit
1e71f67736
225 changed files with 1342 additions and 1432 deletions
|
@ -126,9 +126,9 @@ class CardTableModRefBS: public ModRefBarrierSet {
|
|||
// Mapping from address to card marking array entry
|
||||
jbyte* byte_for(const void* p) const {
|
||||
assert(_whole_heap.contains(p),
|
||||
err_msg("Attempt to access p = " PTR_FORMAT " out of bounds of "
|
||||
" card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")",
|
||||
p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end())));
|
||||
"Attempt to access p = " PTR_FORMAT " out of bounds of "
|
||||
" card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")",
|
||||
p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end()));
|
||||
jbyte* result = &byte_map_base[uintptr_t(p) >> card_shift];
|
||||
assert(result >= _byte_map && result < _byte_map + _byte_map_size,
|
||||
"out of bounds accessor for card marking array");
|
||||
|
@ -294,18 +294,18 @@ public:
|
|||
size_t delta = pointer_delta(p, byte_map_base, sizeof(jbyte));
|
||||
HeapWord* result = (HeapWord*) (delta << card_shift);
|
||||
assert(_whole_heap.contains(result),
|
||||
err_msg("Returning result = " PTR_FORMAT " out of bounds of "
|
||||
" card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")",
|
||||
p2i(result), p2i(_whole_heap.start()), p2i(_whole_heap.end())));
|
||||
"Returning result = " PTR_FORMAT " out of bounds of "
|
||||
" card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")",
|
||||
p2i(result), p2i(_whole_heap.start()), p2i(_whole_heap.end()));
|
||||
return result;
|
||||
}
|
||||
|
||||
// Mapping from address to card marking array index.
|
||||
size_t index_for(void* p) {
|
||||
assert(_whole_heap.contains(p),
|
||||
err_msg("Attempt to access p = " PTR_FORMAT " out of bounds of "
|
||||
" card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")",
|
||||
p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end())));
|
||||
"Attempt to access p = " PTR_FORMAT " out of bounds of "
|
||||
" card marking array's _whole_heap = [" PTR_FORMAT "," PTR_FORMAT ")",
|
||||
p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end()));
|
||||
return byte_for(p) - _byte_map;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue