equal
deleted
inserted
replaced
278 _tenuring_threshold = MaxTenuringThreshold; |
278 _tenuring_threshold = MaxTenuringThreshold; |
279 |
279 |
280 if (G1UseSurvivorSpace) { |
280 if (G1UseSurvivorSpace) { |
281 // if G1FixedSurvivorSpaceSize is 0 which means the size is not |
281 // if G1FixedSurvivorSpaceSize is 0 which means the size is not |
282 // fixed, then _max_survivor_regions will be calculated at |
282 // fixed, then _max_survivor_regions will be calculated at |
283 // calculate_young_list_target_config diring initialization |
283 // calculate_young_list_target_config during initialization |
284 _max_survivor_regions = G1FixedSurvivorSpaceSize / HeapRegion::GrainBytes; |
284 _max_survivor_regions = G1FixedSurvivorSpaceSize / HeapRegion::GrainBytes; |
285 } else { |
285 } else { |
286 _max_survivor_regions = 0; |
286 _max_survivor_regions = 0; |
287 } |
287 } |
288 |
288 |
295 } |
295 } |
296 |
296 |
297 void G1CollectorPolicy::initialize_flags() { |
297 void G1CollectorPolicy::initialize_flags() { |
298 set_min_alignment(HeapRegion::GrainBytes); |
298 set_min_alignment(HeapRegion::GrainBytes); |
299 set_max_alignment(GenRemSet::max_alignment_constraint(rem_set_name())); |
299 set_max_alignment(GenRemSet::max_alignment_constraint(rem_set_name())); |
|
300 if (SurvivorRatio < 1) { |
|
301 vm_exit_during_initialization("Invalid survivor ratio specified"); |
|
302 } |
300 CollectorPolicy::initialize_flags(); |
303 CollectorPolicy::initialize_flags(); |
301 } |
304 } |
302 |
305 |
303 void G1CollectorPolicy::init() { |
306 void G1CollectorPolicy::init() { |
304 // Set aside an initial future to_space. |
307 // Set aside an initial future to_space. |
2768 return; |
2771 return; |
2769 } |
2772 } |
2770 if (G1FixedSurvivorSpaceSize == 0) { |
2773 if (G1FixedSurvivorSpaceSize == 0) { |
2771 _max_survivor_regions = _young_list_target_length / SurvivorRatio; |
2774 _max_survivor_regions = _young_list_target_length / SurvivorRatio; |
2772 } else { |
2775 } else { |
2773 _max_survivor_regions = G1FixedSurvivorSpaceSize; |
2776 _max_survivor_regions = G1FixedSurvivorSpaceSize / HeapRegion::GrainBytes; |
2774 } |
2777 } |
2775 |
2778 |
2776 if (G1FixedTenuringThreshold) { |
2779 if (G1FixedTenuringThreshold) { |
2777 _tenuring_threshold = MaxTenuringThreshold; |
2780 _tenuring_threshold = MaxTenuringThreshold; |
2778 } else { |
2781 } else { |