894 _analytics->predict_object_copy_time_ms(bytes_to_copy, collector_state()->during_concurrent_mark());
895
896 // The prediction of the "other" time for this region is based
897 // upon the region type and NOT the GC type.
898 if (hr->is_young()) {
899 region_elapsed_time_ms += _analytics->predict_young_other_time_ms(1);
900 } else {
901 region_elapsed_time_ms += _analytics->predict_non_young_other_time_ms(1);
902 }
903 return region_elapsed_time_ms;
904 }
905
906
907 void G1DefaultPolicy::print_yg_surv_rate_info() const {
908 #ifndef PRODUCT
909 _short_lived_surv_rate_group->print_surv_rate_summary();
910 // add this call for any other surv rate groups
911 #endif // PRODUCT
912 }
913
914 bool G1DefaultPolicy::is_young_list_full() const {
915 uint young_list_length = _g1->young_list()->length();
916 uint young_list_target_length = _young_list_target_length;
917 return young_list_length >= young_list_target_length;
918 }
919
920 bool G1DefaultPolicy::can_expand_young_list() const {
921 uint young_list_length = _g1->young_list()->length();
922 uint young_list_max_length = _young_list_max_length;
923 return young_list_length < young_list_max_length;
924 }
925
926 bool G1DefaultPolicy::adaptive_young_list_length() const {
927 return _young_gen_sizer.adaptive_young_list_length();
928 }
929
930 void G1DefaultPolicy::update_max_gc_locker_expansion() {
931 uint expansion_region_num = 0;
932 if (GCLockerEdenExpansionPercent > 0) {
933 double perc = (double) GCLockerEdenExpansionPercent / 100.0;
934 double expansion_region_num_d = perc * (double) _young_list_target_length;
935 // We use ceiling so that if expansion_region_num_d is > 0.0 (but
936 // less than 1.0) we'll get 1.
937 expansion_region_num = (uint) ceil(expansion_region_num_d);
|
894 _analytics->predict_object_copy_time_ms(bytes_to_copy, collector_state()->during_concurrent_mark());
895
896 // The prediction of the "other" time for this region is based
897 // upon the region type and NOT the GC type.
898 if (hr->is_young()) {
899 region_elapsed_time_ms += _analytics->predict_young_other_time_ms(1);
900 } else {
901 region_elapsed_time_ms += _analytics->predict_non_young_other_time_ms(1);
902 }
903 return region_elapsed_time_ms;
904 }
905
906
907 void G1DefaultPolicy::print_yg_surv_rate_info() const {
908 #ifndef PRODUCT
909 _short_lived_surv_rate_group->print_surv_rate_summary();
910 // add this call for any other surv rate groups
911 #endif // PRODUCT
912 }
913
914 bool G1DefaultPolicy::should_allocate_mutator_region() const {
915 uint young_list_length = _g1->young_list()->length();
916 uint young_list_target_length = _young_list_target_length;
917 return young_list_length < young_list_target_length;
918 }
919
920 bool G1DefaultPolicy::can_expand_young_list() const {
921 uint young_list_length = _g1->young_list()->length();
922 uint young_list_max_length = _young_list_max_length;
923 return young_list_length < young_list_max_length;
924 }
925
926 bool G1DefaultPolicy::adaptive_young_list_length() const {
927 return _young_gen_sizer.adaptive_young_list_length();
928 }
929
930 void G1DefaultPolicy::update_max_gc_locker_expansion() {
931 uint expansion_region_num = 0;
932 if (GCLockerEdenExpansionPercent > 0) {
933 double perc = (double) GCLockerEdenExpansionPercent / 100.0;
934 double expansion_region_num_d = perc * (double) _young_list_target_length;
935 // We use ceiling so that if expansion_region_num_d is > 0.0 (but
936 // less than 1.0) we'll get 1.
937 expansion_region_num = (uint) ceil(expansion_region_num_d);
|