--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Thu Mar 05 16:43:26 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Fri Mar 06 09:07:33 2015 +0100
@@ -110,6 +110,7 @@
void empty_list();
bool is_empty() { return _length == 0; }
uint length() { return _length; }
+ uint eden_length() { return length() - survivor_length(); }
uint survivor_length() { return _survivor_length; }
// Currently we do not keep track of the used byte sum for the
@@ -119,7 +120,7 @@
// we'll report the more accurate information then.
size_t eden_used_bytes() {
assert(length() >= survivor_length(), "invariant");
- return (size_t) (length() - survivor_length()) * HeapRegion::GrainBytes;
+ return (size_t) eden_length() * HeapRegion::GrainBytes;
}
size_t survivor_used_bytes() {
return (size_t) survivor_length() * HeapRegion::GrainBytes;