We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb85b8d commit 397972eCopy full SHA for 397972e
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
@@ -2437,10 +2437,11 @@ void G1CollectedHeap::print_heap_regions() const {
2437
}
2438
2439
void G1CollectedHeap::print_on(outputStream* st) const {
2440
+ size_t heap_used = Heap_lock->owned_by_self() ? used() : used_unlocked();
2441
st->print(" %-20s", "garbage-first heap");
2442
if (_hrm != NULL) {
2443
st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
- capacity()/K, used_unlocked()/K);
2444
+ capacity()/K, heap_used/K);
2445
st->print(" [" PTR_FORMAT ", " PTR_FORMAT ")",
2446
p2i(_hrm->reserved().start()),
2447
p2i(_hrm->reserved().end()));
0 commit comments