8144837: Improve the printout of heap regions in hs_err dump files

Reviewed-by: stefank, sjohanss
This commit is contained in:
David Lindholm 2015-12-09 14:49:26 +01:00
parent 1feaca45a7
commit 87a31aaa33
2 changed files with 17 additions and 14 deletions

View file

@ -3266,11 +3266,11 @@ void G1CollectedHeap::print_extended_on(outputStream* st) const {
// Print the per-region information. // Print the per-region information.
st->cr(); st->cr();
st->print_cr("Heap Regions: (E=young(eden), S=young(survivor), O=old, " st->print_cr("Heap Regions: E=young(eden), S=young(survivor), O=old, "
"HS=humongous(starts), HC=humongous(continues), " "HS=humongous(starts), HC=humongous(continues), "
"CS=collection set, F=free, A=archive, TS=gc time stamp, " "CS=collection set, F=free, A=archive, TS=gc time stamp, "
"PTAMS=previous top-at-mark-start, " "AC=allocation context, "
"NTAMS=next top-at-mark-start)"); "TAMS=top-at-mark-start (previous, next)");
PrintRegionClosure blk(st); PrintRegionClosure blk(st);
heap_region_iterate(&blk); heap_region_iterate(&blk);
} }

View file

@ -592,17 +592,20 @@ void HeapRegion::verify_strong_code_roots(VerifyOption vo, bool* failures) const
void HeapRegion::print() const { print_on(gclog_or_tty); } void HeapRegion::print() const { print_on(gclog_or_tty); }
void HeapRegion::print_on(outputStream* st) const { void HeapRegion::print_on(outputStream* st) const {
st->print("AC%4u", allocation_context()); st->print("|%4u", this->_hrm_index);
st->print("|" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT,
st->print(" %2s", get_short_type_str()); p2i(bottom()), p2i(top()), p2i(end()));
if (in_collection_set()) st->print("|%3d%%", (int) ((double) used() * 100 / capacity()));
st->print(" CS"); st->print("|%2s", get_short_type_str());
else if (in_collection_set()) {
st->print(" "); st->print("|CS");
st->print(" TS %5d", _gc_time_stamp); } else {
st->print(" PTAMS " PTR_FORMAT " NTAMS " PTR_FORMAT, st->print("| ");
}
st->print("|TS%3u", _gc_time_stamp);
st->print("|AC%3u", allocation_context());
st->print_cr("|TAMS " PTR_FORMAT ", " PTR_FORMAT "|",
p2i(prev_top_at_mark_start()), p2i(next_top_at_mark_start())); p2i(prev_top_at_mark_start()), p2i(next_top_at_mark_start()));
G1OffsetTableContigSpace::print_on(st);
} }
class VerifyLiveClosure: public OopClosure { class VerifyLiveClosure: public OopClosure {