< prev index next >
src/share/vm/gc/g1/heapRegionSet.cpp
Print this page
@@ -47,12 +47,12 @@
// for the verification calls. If we do verification without the
// appropriate locks and the set changes underneath our feet
// verification might fail and send us on a wild goose chase.
check_mt_safety();
- guarantee_heap_region_set(( is_empty() && length() == 0 && total_capacity_bytes() == 0) ||
- (!is_empty() && length() > 0 && total_capacity_bytes() > 0) ,
+ guarantee_heap_region_set(( is_empty() && length() == 0) ||
+ (!is_empty() && length() > 0),
"invariant");
}
void HeapRegionSetBase::verify_start() {
// See comment in verify() about MT safety and verification.
@@ -79,18 +79,16 @@
out->print_cr(" Region Assumptions");
out->print_cr(" humongous : %s", BOOL_TO_STR(regions_humongous()));
out->print_cr(" free : %s", BOOL_TO_STR(regions_free()));
out->print_cr(" Attributes");
out->print_cr(" length : %14u", length());
- out->print_cr(" total capacity : " SIZE_FORMAT_W(14) " bytes",
- total_capacity_bytes());
}
HeapRegionSetBase::HeapRegionSetBase(const char* name, bool humongous, bool free, HRSMtSafeChecker* mt_safety_checker)
: _name(name), _verify_in_progress(false),
_is_humongous(humongous), _is_free(free), _mt_safety_checker(mt_safety_checker),
- _count()
+ _length(0)
{ }
void FreeRegionList::set_unrealistically_long_length(uint len) {
guarantee(_unrealistically_long_length == 0, "should only be set once");
_unrealistically_long_length = len;
@@ -175,11 +173,11 @@
if (_tail->hrm_index() < from_list->_tail->hrm_index()) {
_tail = from_list->_tail;
}
}
- _count.increment(from_list->length(), from_list->total_capacity_bytes());
+ _length += from_list->length();
from_list->clear();
verify_optional();
from_list->verify_optional();
}
@@ -253,11 +251,11 @@
verify_end();
}
void FreeRegionList::clear() {
- _count = HeapRegionSetCount();
+ _length = 0;
_head = NULL;
_tail = NULL;
_last = NULL;
}
@@ -292,12 +290,10 @@
}
guarantee(_tail == prev0, "Expected %s to end with %u but it ended with %u.", name(), _tail->hrm_index(), prev0->hrm_index());
guarantee(_tail == NULL || _tail->next() == NULL, "_tail should not have a next");
guarantee(length() == count, "%s count mismatch. Expected %u, actual %u.", name(), length(), count);
- guarantee(total_capacity_bytes() == capacity, "%s capacity mismatch. Expected " SIZE_FORMAT ", actual " SIZE_FORMAT,
- name(), total_capacity_bytes(), capacity);
}
// Note on the check_mt_safety() methods below:
//
// Verification of the "master" heap region sets / lists that are
< prev index next >