< prev index next >
src/share/vm/gc/g1/g1DefaultPolicy.cpp
Print this page
rev 11552 : imported patch 8159978-collection-set-as-array
*** 392,432 ****
if (collector_state()->gcs_are_young() && adaptive_young_list_length()) {
_rs_lengths_prediction = prediction;
}
}
- #ifndef PRODUCT
- bool G1DefaultPolicy::verify_young_ages() {
- bool ret = true;
-
- for (HeapRegion* curr = _collection_set->inc_head();
- curr != NULL;
- curr = curr->next_in_collection_set()) {
- guarantee(curr->is_young(), "Region must be young");
-
- SurvRateGroup* group = curr->surv_rate_group();
-
- if (group == NULL) {
- log_error(gc, verify)("## encountered NULL surv_rate_group in young region");
- ret = false;
- }
-
- if (curr->age_in_surv_rate_group() < 0) {
- log_error(gc, verify)("## encountered negative age in young region");
- ret = false;
- }
- }
-
- if (!ret) {
- LogStreamHandle(Error, gc, verify) log;
- _collection_set->print(_collection_set->inc_head(), &log);
- }
-
- return ret;
- }
- #endif // PRODUCT
-
void G1DefaultPolicy::record_full_collection_start() {
_full_collection_start_sec = os::elapsedTime();
// Release the future to-space so that it is available for compaction into.
collector_state()->set_full_collection(true);
}
--- 392,401 ----
*** 486,496 ****
// do that for any other surv rate groups
_short_lived_surv_rate_group->stop_adding_regions();
_survivors_age_table.clear();
! assert( verify_young_ages(), "region age verification" );
}
void G1DefaultPolicy::record_concurrent_mark_init_end(double mark_init_elapsed_time_ms) {
collector_state()->set_during_marking(true);
assert(!collector_state()->initiate_conc_mark_if_possible(), "we should have cleared it by now");
--- 455,465 ----
// do that for any other surv rate groups
_short_lived_surv_rate_group->stop_adding_regions();
_survivors_age_table.clear();
! assert(_g1->collection_set()->verify_young_ages(), "region age verification failed");
}
void G1DefaultPolicy::record_concurrent_mark_init_end(double mark_init_elapsed_time_ms) {
collector_state()->set_during_marking(true);
assert(!collector_state()->initiate_conc_mark_if_possible(), "we should have cleared it by now");
< prev index next >