< prev index next >

src/hotspot/share/gc/g1/g1Analytics.cpp

Print this page
rev 56992 : imported patch 8227739-merge-scan-rs-update-rs-cost
rev 56993 : [mq]: 8227739-sjohanss-review


 227   _rs_length_seq->add(rs_length);
 228 }
 229 
 230 double G1Analytics::predict_alloc_rate_ms() const {
 231   return get_new_prediction(_alloc_rate_ms_seq);
 232 }
 233 
 234 double G1Analytics::predict_concurrent_refine_rate_ms() const {
 235   return get_new_prediction(_concurrent_refine_rate_ms_seq);
 236 }
 237 
 238 double G1Analytics::predict_logged_cards_rate_ms() const {
 239   return get_new_prediction(_logged_cards_rate_ms_seq);
 240 }
 241 
 242 double G1Analytics::predict_young_card_merge_to_scan_ratio() const {
 243   return get_new_prediction(_young_card_merge_to_scan_ratio_seq);
 244 }
 245 
 246 size_t G1Analytics::predict_scan_card_num(size_t rs_length, bool for_young_gc) const {
 247   if (for_young_gc || _mixed_card_merge_to_scan_ratio_seq->num() < 3) {
 248     return (size_t) (rs_length * predict_young_card_merge_to_scan_ratio());
 249   } else {
 250     return (size_t) (rs_length * get_new_prediction(_mixed_card_merge_to_scan_ratio_seq));
 251   }
 252 }
 253 
 254 double G1Analytics::predict_card_merge_time_ms(size_t card_num, bool for_young_gc) const {
 255   if (for_young_gc || _mixed_cost_per_card_merge_ms_seq->num() < 3) {
 256     return card_num * get_new_prediction(_young_cost_per_card_merge_ms_seq);
 257   } else {
 258     return card_num * get_new_prediction(_mixed_cost_per_card_merge_ms_seq);
 259   }
 260 }
 261 
 262 double G1Analytics::predict_card_scan_time_ms(size_t card_num, bool for_young_gc) const {
 263   if (for_young_gc || _mixed_cost_per_card_scan_ms_seq->num() < 3) {
 264     return card_num * get_new_prediction(_young_cost_per_card_scan_ms_seq);
 265   } else {
 266     return card_num * get_new_prediction(_mixed_cost_per_card_scan_ms_seq);
 267   }
 268 }
 269 
 270 double G1Analytics::predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const {
 271   if (_cost_per_byte_ms_during_cm_seq->num() < 3) {
 272     return (1.1 * bytes_to_copy) * get_new_prediction(_copy_cost_per_byte_ms_seq);
 273   } else {
 274     return bytes_to_copy * get_new_prediction(_cost_per_byte_ms_during_cm_seq);
 275   }
 276 }
 277 
 278 double G1Analytics::predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const {
 279   if (during_concurrent_mark) {
 280     return predict_object_copy_time_ms_during_cm(bytes_to_copy);
 281   } else {
 282     return bytes_to_copy * get_new_prediction(_copy_cost_per_byte_ms_seq);
 283   }
 284 }
 285 
 286 double G1Analytics::predict_constant_other_time_ms() const {
 287   return get_new_prediction(_constant_other_time_ms_seq);
 288 }
 289 
 290 double G1Analytics::predict_young_other_time_ms(size_t young_num) const {
 291   return young_num * get_new_prediction(_young_other_cost_per_region_ms_seq);




 227   _rs_length_seq->add(rs_length);
 228 }
 229 
 230 double G1Analytics::predict_alloc_rate_ms() const {
 231   return get_new_prediction(_alloc_rate_ms_seq);
 232 }
 233 
 234 double G1Analytics::predict_concurrent_refine_rate_ms() const {
 235   return get_new_prediction(_concurrent_refine_rate_ms_seq);
 236 }
 237 
 238 double G1Analytics::predict_logged_cards_rate_ms() const {
 239   return get_new_prediction(_logged_cards_rate_ms_seq);
 240 }
 241 
 242 double G1Analytics::predict_young_card_merge_to_scan_ratio() const {
 243   return get_new_prediction(_young_card_merge_to_scan_ratio_seq);
 244 }
 245 
 246 size_t G1Analytics::predict_scan_card_num(size_t rs_length, bool for_young_gc) const {
 247   if (for_young_gc || !enough_samples_available(_mixed_card_merge_to_scan_ratio_seq)) {
 248     return (size_t) (rs_length * predict_young_card_merge_to_scan_ratio());
 249   } else {
 250     return (size_t) (rs_length * get_new_prediction(_mixed_card_merge_to_scan_ratio_seq));
 251   }
 252 }
 253 
 254 double G1Analytics::predict_card_merge_time_ms(size_t card_num, bool for_young_gc) const {
 255   if (for_young_gc || !enough_samples_available(_mixed_cost_per_card_merge_ms_seq->num())) {
 256     return card_num * get_new_prediction(_young_cost_per_card_merge_ms_seq);
 257   } else {
 258     return card_num * get_new_prediction(_mixed_cost_per_card_merge_ms_seq);
 259   }
 260 }
 261 
 262 double G1Analytics::predict_card_scan_time_ms(size_t card_num, bool for_young_gc) const {
 263   if (for_young_gc || !enough_samples_available(_mixed_cost_per_card_scan_ms_seq->num())) {
 264     return card_num * get_new_prediction(_young_cost_per_card_scan_ms_seq);
 265   } else {
 266     return card_num * get_new_prediction(_mixed_cost_per_card_scan_ms_seq);
 267   }
 268 }
 269 
 270 double G1Analytics::predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const {
 271   if (!enough_samples_available(_cost_per_byte_ms_during_cm_seq)) {
 272     return (1.1 * bytes_to_copy) * get_new_prediction(_copy_cost_per_byte_ms_seq);
 273   } else {
 274     return bytes_to_copy * get_new_prediction(_cost_per_byte_ms_during_cm_seq);
 275   }
 276 }
 277 
 278 double G1Analytics::predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const {
 279   if (during_concurrent_mark) {
 280     return predict_object_copy_time_ms_during_cm(bytes_to_copy);
 281   } else {
 282     return bytes_to_copy * get_new_prediction(_copy_cost_per_byte_ms_seq);
 283   }
 284 }
 285 
 286 double G1Analytics::predict_constant_other_time_ms() const {
 287   return get_new_prediction(_constant_other_time_ms_seq);
 288 }
 289 
 290 double G1Analytics::predict_young_other_time_ms(size_t young_num) const {
 291   return young_num * get_new_prediction(_young_other_cost_per_region_ms_seq);


< prev index next >