8080775: Better argument formatting for assert() and friends

Reviewed-by: kbarrett, pliden
This commit is contained in:
David Lindholm 2015-09-29 11:02:08 +02:00
parent aa0818a98a
commit 1e71f67736
225 changed files with 1342 additions and 1432 deletions

View file

@ -376,8 +376,8 @@ void FromCardCache::initialize(uint n_par_rs, uint max_num_regions) {
void FromCardCache::invalidate(uint start_idx, size_t new_num_regions) {
guarantee((size_t)start_idx + new_num_regions <= max_uintx,
err_msg("Trying to invalidate beyond maximum region, from %u size " SIZE_FORMAT,
start_idx, new_num_regions));
"Trying to invalidate beyond maximum region, from %u size " SIZE_FORMAT,
start_idx, new_num_regions);
for (uint i = 0; i < HeapRegionRemSet::num_par_rem_sets(); i++) {
uint end_idx = (start_idx + (uint)new_num_regions);
assert(end_idx <= _max_regions, "Must be within max.");
@ -1013,7 +1013,7 @@ bool HeapRegionRemSetIterator::fine_has_next(size_t& card_index) {
card_index = _cur_region_card_offset + _cur_card_in_prt;
guarantee(_cur_card_in_prt < HeapRegion::CardsPerRegion,
err_msg("Card index " SIZE_FORMAT " must be within the region", _cur_card_in_prt));
"Card index " SIZE_FORMAT " must be within the region", _cur_card_in_prt);
return true;
}
@ -1182,8 +1182,8 @@ void PerRegionTable::test_fl_mem_size() {
size_t min_prt_size = sizeof(void*) + dummy->bm()->size_in_words() * HeapWordSize;
assert(dummy->mem_size() > min_prt_size,
err_msg("PerRegionTable memory usage is suspiciously small, only has " SIZE_FORMAT " bytes. "
"Should be at least " SIZE_FORMAT " bytes.", dummy->mem_size(), min_prt_size));
"PerRegionTable memory usage is suspiciously small, only has " SIZE_FORMAT " bytes. "
"Should be at least " SIZE_FORMAT " bytes.", dummy->mem_size(), min_prt_size);
free(dummy);
guarantee(dummy->mem_size() == fl_mem_size(), "fl_mem_size() does not return the correct element size");
// try to reset the state