equal
deleted
inserted
replaced
491 |
491 |
492 double predict_survivor_regions_evac_time(); |
492 double predict_survivor_regions_evac_time(); |
493 |
493 |
494 // </NEW PREDICTION> |
494 // </NEW PREDICTION> |
495 |
495 |
496 public: |
|
497 void cset_regions_freed() { |
496 void cset_regions_freed() { |
498 bool propagate = _last_young_gc_full && !_in_marking_window; |
497 bool propagate = _last_young_gc_full && !_in_marking_window; |
499 _short_lived_surv_rate_group->all_surviving_words_recorded(propagate); |
498 _short_lived_surv_rate_group->all_surviving_words_recorded(propagate); |
500 _survivor_surv_rate_group->all_surviving_words_recorded(propagate); |
499 _survivor_surv_rate_group->all_surviving_words_recorded(propagate); |
501 // also call it on any more surv rate groups |
500 // also call it on any more surv rate groups |
1043 |
1042 |
1044 // This sets the initiate_conc_mark_if_possible() flag to start a |
1043 // This sets the initiate_conc_mark_if_possible() flag to start a |
1045 // new cycle, as long as we are not already in one. It's best if it |
1044 // new cycle, as long as we are not already in one. It's best if it |
1046 // is called during a safepoint when the test whether a cycle is in |
1045 // is called during a safepoint when the test whether a cycle is in |
1047 // progress or not is stable. |
1046 // progress or not is stable. |
1048 bool force_initial_mark_if_outside_cycle(); |
1047 bool force_initial_mark_if_outside_cycle(GCCause::Cause gc_cause); |
1049 |
1048 |
1050 // This is called at the very beginning of an evacuation pause (it |
1049 // This is called at the very beginning of an evacuation pause (it |
1051 // has to be the first thing that the pause does). If |
1050 // has to be the first thing that the pause does). If |
1052 // initiate_conc_mark_if_possible() is true, and the concurrent |
1051 // initiate_conc_mark_if_possible() is true, and the concurrent |
1053 // marking thread has completed its work during the previous cycle, |
1052 // marking thread has completed its work during the previous cycle, |
1232 // survival rate. Then fill out the number of needed regions |
1231 // survival rate. Then fill out the number of needed regions |
1233 // with young regions. |
1232 // with young regions. |
1234 |
1233 |
1235 class G1CollectorPolicy_BestRegionsFirst: public G1CollectorPolicy { |
1234 class G1CollectorPolicy_BestRegionsFirst: public G1CollectorPolicy { |
1236 CollectionSetChooser* _collectionSetChooser; |
1235 CollectionSetChooser* _collectionSetChooser; |
1237 // If the estimated is less then desirable, resize if possible. |
|
1238 void expand_if_possible(size_t numRegions); |
|
1239 |
1236 |
1240 virtual void choose_collection_set(double target_pause_time_ms); |
1237 virtual void choose_collection_set(double target_pause_time_ms); |
1241 virtual void record_collection_pause_start(double start_time_sec, |
1238 virtual void record_collection_pause_start(double start_time_sec, |
1242 size_t start_used); |
1239 size_t start_used); |
1243 virtual void record_concurrent_mark_cleanup_end(size_t freed_bytes, |
1240 virtual void record_concurrent_mark_cleanup_end(size_t freed_bytes, |
1267 double n_d = (double)n; |
1264 double n_d = (double)n; |
1268 double avg = sum/n_d; |
1265 double avg = sum/n_d; |
1269 return (sum_of_squares - 2.0 * avg * sum + n_d * avg * avg) / n_d; |
1266 return (sum_of_squares - 2.0 * avg * sum + n_d * avg * avg) / n_d; |
1270 } |
1267 } |
1271 |
1268 |
1272 // Local Variables: *** |
|
1273 // c-indentation-style: gnu *** |
|
1274 // End: *** |
|
1275 |
|
1276 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTORPOLICY_HPP |
1269 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTORPOLICY_HPP |