@@ -2112,16 +2112,18 @@ void G1CollectedHeap::print_heap_regions() const {
21122112 }
21132113}
21142114
2115- void G1CollectedHeap::print_on (outputStream* st) const {
2115+ void G1CollectedHeap::print_heap_on (outputStream* st) const {
21162116 size_t heap_used = Heap_lock->owned_by_self () ? used () : used_unlocked ();
2117- st->print (" %-20s" , " garbage-first heap" );
2117+ st->print (" %-20s" , " garbage-first heap" );
21182118 st->print (" total reserved %zuK, committed %zuK, used %zuK" ,
21192119 _hrm.reserved ().byte_size ()/K, capacity ()/K, heap_used/K);
21202120 st->print (" [" PTR_FORMAT " , " PTR_FORMAT " )" ,
21212121 p2i (_hrm.reserved ().start ()),
21222122 p2i (_hrm.reserved ().end ()));
21232123 st->cr ();
2124- st->print (" region size %zuK, " , G1HeapRegion::GrainBytes / K);
2124+
2125+ StreamAutoIndentor indentor (st, 1 );
2126+ st->print (" region size %zuK, " , G1HeapRegion::GrainBytes / K);
21252127 uint young_regions = young_regions_count ();
21262128 st->print (" %u young (%zuK), " , young_regions,
21272129 (size_t ) young_regions * G1HeapRegion::GrainBytes / K);
@@ -2131,15 +2133,14 @@ void G1CollectedHeap::print_on(outputStream* st) const {
21312133 st->cr ();
21322134 if (_numa->is_enabled ()) {
21332135 uint num_nodes = _numa->num_active_nodes ();
2134- st->print (" remaining free region(s) on each NUMA node: " );
2136+ st->print (" remaining free region(s) on each NUMA node: " );
21352137 const uint* node_ids = _numa->node_ids ();
21362138 for (uint node_index = 0 ; node_index < num_nodes; node_index++) {
21372139 uint num_free_regions = _hrm.num_free_regions (node_index);
21382140 st->print (" %u=%u " , node_ids[node_index], num_free_regions);
21392141 }
21402142 st->cr ();
21412143 }
2142- MetaspaceUtils::print_on (st);
21432144}
21442145
21452146void G1CollectedHeap::print_regions_on (outputStream* st) const {
@@ -2153,15 +2154,16 @@ void G1CollectedHeap::print_regions_on(outputStream* st) const {
21532154}
21542155
21552156void G1CollectedHeap::print_extended_on (outputStream* st) const {
2156- print_on (st);
2157+ print_heap_on (st);
21572158
21582159 // Print the per-region information.
21592160 st->cr ();
21602161 print_regions_on (st);
21612162}
21622163
2163- void G1CollectedHeap::print_on_error (outputStream* st) const {
2164- print_extended_on (st);
2164+ void G1CollectedHeap::print_gc_on (outputStream* st) const {
2165+ // Print the per-region information.
2166+ print_regions_on (st);
21652167 st->cr ();
21662168
21672169 BarrierSet* bs = BarrierSet::barrier_set ();
@@ -2171,7 +2173,7 @@ void G1CollectedHeap::print_on_error(outputStream* st) const {
21712173
21722174 if (_cm != nullptr ) {
21732175 st->cr ();
2174- _cm->print_on_error (st);
2176+ _cm->print_on (st);
21752177 }
21762178}
21772179
0 commit comments