comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 20655:b840813adfcc

8065305: Make it possible to extend the G1CollectorPolicy Summary: Added a G1CollectorPolicyExt where it is possible to extend the class. Reviewed-by: sjohanss, tschatzl
author jwilhelm
date Fri, 21 Nov 2014 12:08:37 +0100
parents c02ec279b062
children 7848fc12602b
comparison
equal deleted inserted replaced
20654:fa6adc194d48 20655:b840813adfcc
1423 _short_lived_surv_rate_group->print_surv_rate_summary(); 1423 _short_lived_surv_rate_group->print_surv_rate_summary();
1424 // add this call for any other surv rate groups 1424 // add this call for any other surv rate groups
1425 #endif // PRODUCT 1425 #endif // PRODUCT
1426 } 1426 }
1427 1427
1428 bool G1CollectorPolicy::is_young_list_full() {
1429 uint young_list_length = _g1->young_list()->length();
1430 uint young_list_target_length = _young_list_target_length;
1431 return young_list_length >= young_list_target_length;
1432 }
1433
1434 bool G1CollectorPolicy::can_expand_young_list() {
1435 uint young_list_length = _g1->young_list()->length();
1436 uint young_list_max_length = _young_list_max_length;
1437 return young_list_length < young_list_max_length;
1438 }
1439
1428 uint G1CollectorPolicy::max_regions(int purpose) { 1440 uint G1CollectorPolicy::max_regions(int purpose) {
1429 switch (purpose) { 1441 switch (purpose) {
1430 case GCAllocForSurvived: 1442 case GCAllocForSurvived:
1431 return _max_survivor_regions; 1443 return _max_survivor_regions;
1432 case GCAllocForTenured: 1444 case GCAllocForTenured: