Skip to content

Commit

Permalink
8255848: -Xlog:gc+heap+exit shows "used 0K"
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, ayang
  • Loading branch information
kstefanj committed Nov 5, 2020
1 parent eb85b8d commit 397972e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2437,10 +2437,11 @@ 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");
if (_hrm != NULL) {
st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
capacity()/K, used_unlocked()/K);
capacity()/K, heap_used/K);
st->print(" [" PTR_FORMAT ", " PTR_FORMAT ")",
p2i(_hrm->reserved().start()),
p2i(_hrm->reserved().end()));
Expand Down

1 comment on commit 397972e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.