SurvivorRatio 的默认值是8
SurvivorRatio
class G1Policy: public CHeapObj<mtGC> { uint _max_survivor_regions; }; void G1Policy::update_survivors_policy() { double max_survivor_regions_d = (double) _young_list_target_length / (double) SurvivorRatio; uint const desired_max_survivor_regions = ceil(max_survivor_regions_d); _max_survivor_regions = MIN2(desired_max_survivor_regions, _g1h->num_free_or_available_regions()); }
void G1Policy::record_collection_pause_start(double start_time_sec) { update_survivors_policy(); }
void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_pause_time_ms) { policy()->record_collection_pause_start(sample_start_time_sec); }
There was an error while loading. Please reload this page.