From 81b5d2211eb2616f497c17114f0a475174ad3bef Mon Sep 17 00:00:00 2001 From: Thomas Stuefe Date: Fri, 1 Sep 2023 08:01:39 +0000 Subject: [PATCH] 8315459: Print G1 reserved and committed sizes as separate items in VM.info and hs_err Reviewed-by: ayang, tschatzl --- src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp index a28c3de9bb8..fc3af65bf70 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp @@ -2199,8 +2199,8 @@ void G1CollectedHeap::print_heap_regions() const { void G1CollectedHeap::print_on(outputStream* st) const { size_t heap_used = Heap_lock->owned_by_self() ? used() : used_unlocked(); st->print(" %-20s", "garbage-first heap"); - st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", - capacity()/K, heap_used/K); + st->print(" total reserved %zuK, committed %zuK, used %zuK", + _hrm.reserved().byte_size()/K, capacity()/K, heap_used/K); st->print(" [" PTR_FORMAT ", " PTR_FORMAT ")", p2i(_hrm.reserved().start()), p2i(_hrm.reserved().end()));