Date: Fri, 9 Jun 2023 14:35:50 +0800 Subject: [PATCH 52/59] 8177959: G1CollectedHeap::print_on prints incorrect capacity Bug url: https://bugs.openjdk.org/browse/JDK-8177959 --- hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index ebd07c2d5..1ce641cae 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -3466,9 +3466,8 @@ void G1CollectedHeap::print_on(outputStream* st) const { st->print(" %-20s", "garbage-first heap"); st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", capacity()/K, used_unlocked()/K); - st->print(" [" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT ")", + st->print(" [" PTR_FORMAT ", " PTR_FORMAT ")", p2i(_hrm.reserved().start()), - p2i(_hrm.reserved().start() + _hrm.length() + HeapRegion::GrainWords), p2i(_hrm.reserved().end())); st->cr(); st->print(" region size " SIZE_FORMAT "K, ", HeapRegion::GrainBytes / K); -- 2.22.0