--- old/src/hotspot/share/gc/g1/g1FullGCOopClosures.cpp 2019-02-15 14:22:48.933587237 +0100 +++ new/src/hotspot/share/gc/g1/g1FullGCOopClosures.cpp 2019-02-15 14:22:48.678579344 +0100 @@ -71,26 +71,19 @@ } if (!_g1h->is_in_closed_subset(obj)) { HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); - yy.print_cr("Field " PTR_FORMAT - " of live obj " PTR_FORMAT " in region " - "[" PTR_FORMAT ", " PTR_FORMAT ")", - p2i(p), p2i(_containing_obj), - p2i(from->bottom()), p2i(from->end())); + yy.print_cr("Field " PTR_FORMAT " of live obj " PTR_FORMAT " in region " HR_FORMAT, + p2i(p), p2i(_containing_obj), HR_FORMAT_PARAMS(from)); print_object(&yy, _containing_obj); yy.print_cr("points to obj " PTR_FORMAT " not in the heap", - p2i(obj)); + p2i(obj)); } else { HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); HeapRegion* to = _g1h->heap_region_containing((HeapWord*)obj); - yy.print_cr("Field " PTR_FORMAT - " of live obj " PTR_FORMAT " in region " - "[" PTR_FORMAT ", " PTR_FORMAT ")", - p2i(p), p2i(_containing_obj), - p2i(from->bottom()), p2i(from->end())); + yy.print_cr("Field " PTR_FORMAT " of live obj " PTR_FORMAT " in region " HR_FORMAT, + p2i(p), p2i(_containing_obj), HR_FORMAT_PARAMS(from)); print_object(&yy, _containing_obj); - yy.print_cr("points to dead obj " PTR_FORMAT " in region " - "[" PTR_FORMAT ", " PTR_FORMAT ")", - p2i(obj), p2i(to->bottom()), p2i(to->end())); + yy.print_cr("points to dead obj " PTR_FORMAT " in region " HR_FORMAT, + p2i(obj), HR_FORMAT_PARAMS(to)); print_object(&yy, obj); } yy.print_cr("----------"); --- old/src/hotspot/share/gc/g1/heapRegion.cpp 2019-02-15 14:22:50.218627013 +0100 +++ new/src/hotspot/share/gc/g1/heapRegion.cpp 2019-02-15 14:22:49.960619027 +0100 @@ -336,8 +336,8 @@ // Object is in the region. Check that its less than top if (_hr->top() <= (HeapWord*)obj) { // Object is above top - log_error(gc, verify)("Object " PTR_FORMAT " in region [" PTR_FORMAT ", " PTR_FORMAT ") is above top " PTR_FORMAT, - p2i(obj), p2i(_hr->bottom()), p2i(_hr->end()), p2i(_hr->top())); + log_error(gc, verify)("Object " PTR_FORMAT " in region " HR_FORMAT " is above top ", + p2i(obj), HR_FORMAT_PARAMS(_hr)); _failures = true; return; } @@ -415,8 +415,8 @@ // on its strong code root list if (is_empty()) { if (strong_code_roots_length > 0) { - log_error(gc, verify)("region [" PTR_FORMAT "," PTR_FORMAT "] is empty but has " SIZE_FORMAT " code root entries", - p2i(bottom()), p2i(end()), strong_code_roots_length); + log_error(gc, verify)("region " HR_FORMAT " is empty but has " SIZE_FORMAT " code root entries", + HR_FORMAT_PARAMS(this), strong_code_roots_length); *failures = true; } return; @@ -524,21 +524,22 @@ ResourceMark rm; if (!_g1h->is_in_closed_subset(obj)) { HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); - log.error("Field " PTR_FORMAT " of live obj " PTR_FORMAT " in region [" PTR_FORMAT ", " PTR_FORMAT ")", - p2i(p), p2i(_containing_obj), p2i(from->bottom()), p2i(from->end())); + log.error("Field " PTR_FORMAT " of live obj " PTR_FORMAT " in region " HR_FORMAT, + p2i(p), p2i(_containing_obj), HR_FORMAT_PARAMS(from)); LogStream ls(log.error()); print_object(&ls, _containing_obj); HeapRegion* const to = _g1h->heap_region_containing(obj); - log.error("points to obj " PTR_FORMAT " in region " HR_FORMAT " remset %s", p2i(obj), HR_FORMAT_PARAMS(to), to->rem_set()->get_state_str()); + log.error("points to obj " PTR_FORMAT " in region " HR_FORMAT " remset %s", + p2i(obj), HR_FORMAT_PARAMS(to), to->rem_set()->get_state_str()); } else { HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); HeapRegion* to = _g1h->heap_region_containing((HeapWord*)obj); - log.error("Field " PTR_FORMAT " of live obj " PTR_FORMAT " in region [" PTR_FORMAT ", " PTR_FORMAT ")", - p2i(p), p2i(_containing_obj), p2i(from->bottom()), p2i(from->end())); + log.error("Field " PTR_FORMAT " of live obj " PTR_FORMAT " in region " HR_FORMAT, + p2i(p), p2i(_containing_obj), HR_FORMAT_PARAMS(from)); LogStream ls(log.error()); print_object(&ls, _containing_obj); - log.error("points to dead obj " PTR_FORMAT " in region [" PTR_FORMAT ", " PTR_FORMAT ")", - p2i(obj), p2i(to->bottom()), p2i(to->end())); + log.error("points to dead obj " PTR_FORMAT " in region " HR_FORMAT, + p2i(obj), HR_FORMAT_PARAMS(to)); print_object(&ls, obj); } log.error("----------"); @@ -593,12 +594,13 @@ log.error("----------"); } log.error("Missing rem set entry:"); - log.error("Field " PTR_FORMAT " of obj " PTR_FORMAT ", in region " HR_FORMAT, - p2i(p), p2i(_containing_obj), HR_FORMAT_PARAMS(from)); + log.error("Field " PTR_FORMAT " of obj " PTR_FORMAT " in region " HR_FORMAT, + p2i(p), p2i(_containing_obj), HR_FORMAT_PARAMS(from)); ResourceMark rm; LogStream ls(log.error()); _containing_obj->print_on(&ls); - log.error("points to obj " PTR_FORMAT " in region " HR_FORMAT " remset %s", p2i(obj), HR_FORMAT_PARAMS(to), to->rem_set()->get_state_str()); + log.error("points to obj " PTR_FORMAT " in region " HR_FORMAT " remset %s", + p2i(obj), HR_FORMAT_PARAMS(to), to->rem_set()->get_state_str()); if (oopDesc::is_oop(obj)) { obj->print_on(&ls); }