src/share/vm/gc_implementation/g1/heapRegionSet.cpp

Print this page
rev 6923 : imported patch 8054819-rename-heapregionseq

*** 37,51 **** fill_in_ext_msg_extra(msg); } #ifndef PRODUCT void HeapRegionSetBase::verify_region(HeapRegion* hr) { ! assert(hr->containing_set() == this, err_msg("Inconsistent containing set for %u", hr->hrs_index())); ! assert(!hr->is_young(), err_msg("Adding young region %u", hr->hrs_index())); // currently we don't use these sets for young regions ! assert(hr->isHumongous() == regions_humongous(), err_msg("Wrong humongous state for region %u and set %s", hr->hrs_index(), name())); ! assert(hr->is_empty() == regions_empty(), err_msg("Wrong empty state for region %u and set %s", hr->hrs_index(), name())); ! assert(hr->rem_set()->verify_ready_for_par_iteration(), err_msg("Wrong iteration state %u", hr->hrs_index())); } #endif void HeapRegionSetBase::verify() { // It's important that we also observe the MT safety protocol even --- 37,51 ---- fill_in_ext_msg_extra(msg); } #ifndef PRODUCT void HeapRegionSetBase::verify_region(HeapRegion* hr) { ! assert(hr->containing_set() == this, err_msg("Inconsistent containing set for %u", hr->hrm_index())); ! assert(!hr->is_young(), err_msg("Adding young region %u", hr->hrm_index())); // currently we don't use these sets for young regions ! assert(hr->isHumongous() == regions_humongous(), err_msg("Wrong humongous state for region %u and set %s", hr->hrm_index(), name())); ! assert(hr->is_empty() == regions_empty(), err_msg("Wrong empty state for region %u and set %s", hr->hrm_index(), name())); ! assert(hr->rem_set()->verify_ready_for_par_iteration(), err_msg("Wrong iteration state %u", hr->hrm_index())); } #endif void HeapRegionSetBase::verify() { // It's important that we also observe the MT safety protocol even
*** 156,166 **** } else { HeapRegion* curr_to = _head; HeapRegion* curr_from = from_list->_head; while (curr_from != NULL) { ! while (curr_to != NULL && curr_to->hrs_index() < curr_from->hrs_index()) { curr_to = curr_to->next(); } if (curr_to == NULL) { // The rest of the from list should be added as tail --- 156,166 ---- } else { HeapRegion* curr_to = _head; HeapRegion* curr_from = from_list->_head; while (curr_from != NULL) { ! while (curr_to != NULL && curr_to->hrm_index() < curr_from->hrm_index()) { curr_to = curr_to->next(); } if (curr_to == NULL) { // The rest of the from list should be added as tail
*** 181,191 **** curr_from = next_from; } } ! if (_tail->hrs_index() < from_list->_tail->hrs_index()) { _tail = from_list->_tail; } } _count.increment(from_list->length(), from_list->total_capacity_bytes()); --- 181,191 ---- curr_from = next_from; } } ! if (_tail->hrm_index() < from_list->_tail->hrm_index()) { _tail = from_list->_tail; } } _count.increment(from_list->length(), from_list->total_capacity_bytes());
*** 307,327 **** hrs_err_msg("[%s] the calculated length: %u seems very long, is there maybe a cycle? curr: "PTR_FORMAT" prev0: "PTR_FORMAT" " "prev1: "PTR_FORMAT" length: %u", name(), count, curr, prev0, prev1, length())); if (curr->next() != NULL) { guarantee(curr->next()->prev() == curr, "Next or prev pointers messed up"); } ! guarantee(curr->hrs_index() == 0 || curr->hrs_index() > last_index, "List should be sorted"); ! last_index = curr->hrs_index(); capacity += curr->capacity(); prev1 = prev0; prev0 = curr; curr = curr->next(); } ! guarantee(_tail == prev0, err_msg("Expected %s to end with %u but it ended with %u.", name(), _tail->hrs_index(), prev0->hrs_index())); guarantee(_tail == NULL || _tail->next() == NULL, "_tail should not have a next"); guarantee(length() == count, err_msg("%s count mismatch. Expected %u, actual %u.", name(), length(), count)); guarantee(total_capacity_bytes() == capacity, err_msg("%s capacity mismatch. Expected " SIZE_FORMAT ", actual " SIZE_FORMAT, name(), total_capacity_bytes(), capacity)); } --- 307,327 ---- hrs_err_msg("[%s] the calculated length: %u seems very long, is there maybe a cycle? curr: "PTR_FORMAT" prev0: "PTR_FORMAT" " "prev1: "PTR_FORMAT" length: %u", name(), count, curr, prev0, prev1, length())); if (curr->next() != NULL) { guarantee(curr->next()->prev() == curr, "Next or prev pointers messed up"); } ! guarantee(curr->hrm_index() == 0 || curr->hrm_index() > last_index, "List should be sorted"); ! last_index = curr->hrm_index(); capacity += curr->capacity(); prev1 = prev0; prev0 = curr; curr = curr->next(); } ! guarantee(_tail == prev0, err_msg("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, err_msg("%s count mismatch. Expected %u, actual %u.", name(), length(), count)); guarantee(total_capacity_bytes() == capacity, err_msg("%s capacity mismatch. Expected " SIZE_FORMAT ", actual " SIZE_FORMAT, name(), total_capacity_bytes(), capacity)); }