1223 ergo_verbose2(ErgoTiming,
1224 "adjust concurrent refinement thresholds",
1225 ergo_format_reason("Scanning the HCC expected to take longer than Update RS time goal")
1226 ergo_format_ms("Update RS time goal")
1227 ergo_format_ms("Scan HCC time"),
1228 update_rs_time_goal_ms,
1229 scan_hcc_time_ms);
1230
1231 update_rs_time_goal_ms = 0;
1232 } else {
1233 update_rs_time_goal_ms -= scan_hcc_time_ms;
1234 }
1235 adjust_concurrent_refinement(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
1236 phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),
1237 update_rs_time_goal_ms);
1238
1239 _collectionSetChooser->verify();
1240 }
1241
1242 G1IHOPControl* G1CollectorPolicy::create_ihop_control() const {
1243 return new G1StaticIHOPControl(InitiatingHeapOccupancyPercent,
1244 G1CollectedHeap::heap()->max_capacity());
1245 }
1246
1247 void G1CollectorPolicy::update_ihop_prediction(double mutator_time_s,
1248 size_t mutator_alloc_bytes,
1249 size_t young_gen_size) {
1250 // Always try to update IHOP prediction. Even evacuation failures give information
1251 // about e.g. whether to start IHOP earlier next time.
1252
1253 // Avoid using really small application times that might create samples with
1254 // very high or very low values. They may be caused by e.g. back-to-back gcs.
1255 double const min_valid_time = 1e-6;
1256
1257 bool report = false;
1258
1259 double marking_to_mixed_time = -1.0;
1260 if (!collector_state()->last_gc_was_young() && _initial_mark_to_mixed.has_result()) {
1261 marking_to_mixed_time = _initial_mark_to_mixed.last_marking_time();
1262 assert(marking_to_mixed_time > 0.0,
1263 "Initial mark to mixed time must be larger than zero but is %.3f",
1264 marking_to_mixed_time);
|
1223 ergo_verbose2(ErgoTiming,
1224 "adjust concurrent refinement thresholds",
1225 ergo_format_reason("Scanning the HCC expected to take longer than Update RS time goal")
1226 ergo_format_ms("Update RS time goal")
1227 ergo_format_ms("Scan HCC time"),
1228 update_rs_time_goal_ms,
1229 scan_hcc_time_ms);
1230
1231 update_rs_time_goal_ms = 0;
1232 } else {
1233 update_rs_time_goal_ms -= scan_hcc_time_ms;
1234 }
1235 adjust_concurrent_refinement(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
1236 phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),
1237 update_rs_time_goal_ms);
1238
1239 _collectionSetChooser->verify();
1240 }
1241
1242 G1IHOPControl* G1CollectorPolicy::create_ihop_control() const {
1243 if (G1UseAdaptiveIHOP) {
1244 return new G1AdaptiveIHOPControl(InitiatingHeapOccupancyPercent,
1245 G1CollectedHeap::heap()->max_capacity(),
1246 &_predictor,
1247 G1ReservePercent,
1248 G1HeapWastePercent);
1249 } else {
1250 return new G1StaticIHOPControl(InitiatingHeapOccupancyPercent,
1251 G1CollectedHeap::heap()->max_capacity());
1252 }
1253 }
1254
1255 void G1CollectorPolicy::update_ihop_prediction(double mutator_time_s,
1256 size_t mutator_alloc_bytes,
1257 size_t young_gen_size) {
1258 // Always try to update IHOP prediction. Even evacuation failures give information
1259 // about e.g. whether to start IHOP earlier next time.
1260
1261 // Avoid using really small application times that might create samples with
1262 // very high or very low values. They may be caused by e.g. back-to-back gcs.
1263 double const min_valid_time = 1e-6;
1264
1265 bool report = false;
1266
1267 double marking_to_mixed_time = -1.0;
1268 if (!collector_state()->last_gc_was_young() && _initial_mark_to_mixed.has_result()) {
1269 marking_to_mixed_time = _initial_mark_to_mixed.last_marking_time();
1270 assert(marking_to_mixed_time > 0.0,
1271 "Initial mark to mixed time must be larger than zero but is %.3f",
1272 marking_to_mixed_time);
|