1664 if (hr != NULL) |
1664 if (hr != NULL) |
1665 result += hr->used(); |
1665 result += hr->used(); |
1666 return result; |
1666 return result; |
1667 } |
1667 } |
1668 |
1668 |
|
1669 size_t G1CollectedHeap::used_unlocked() const { |
|
1670 size_t result = _summary_bytes_used; |
|
1671 return result; |
|
1672 } |
|
1673 |
1669 class SumUsedClosure: public HeapRegionClosure { |
1674 class SumUsedClosure: public HeapRegionClosure { |
1670 size_t _used; |
1675 size_t _used; |
1671 public: |
1676 public: |
1672 SumUsedClosure() : _used(0) {} |
1677 SumUsedClosure() : _used(0) {} |
1673 bool doHeapRegion(HeapRegion* r) { |
1678 bool doHeapRegion(HeapRegion* r) { |
2347 } |
2352 } |
2348 |
2353 |
2349 void G1CollectedHeap::print_on(outputStream* st, bool extended) const { |
2354 void G1CollectedHeap::print_on(outputStream* st, bool extended) const { |
2350 st->print(" %-20s", "garbage-first heap"); |
2355 st->print(" %-20s", "garbage-first heap"); |
2351 st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", |
2356 st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", |
2352 capacity()/K, used()/K); |
2357 capacity()/K, used_unlocked()/K); |
2353 st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")", |
2358 st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")", |
2354 _g1_storage.low_boundary(), |
2359 _g1_storage.low_boundary(), |
2355 _g1_storage.high(), |
2360 _g1_storage.high(), |
2356 _g1_storage.high_boundary()); |
2361 _g1_storage.high_boundary()); |
2357 st->cr(); |
2362 st->cr(); |