1202 size_t last_unrestrained_young_length = 0;
1203 update_young_list_max_and_target_length(&last_unrestrained_young_length);
1204 update_rs_lengths_prediction();
1205
1206 double marking_to_mixed_time = -1.0;
1207 if (!collector_state()->last_gc_was_young() && _initial_mark_to_mixed.has_result()) {
1208 marking_to_mixed_time = _initial_mark_to_mixed.last_marking_time();
1209 assert(marking_to_mixed_time > 0.0,
1210 "Initial mark to mixed time must be larger than zero but is %.3f",
1211 marking_to_mixed_time);
1212 }
1213 // Only update IHOP information on regular GCs.
1214 if (update_stats) {
1215 update_ihop_statistics(marking_to_mixed_time,
1216 app_time_ms / 1000.0,
1217 _last_old_allocated_bytes,
1218 last_unrestrained_young_length * HeapRegion::GrainBytes);
1219 }
1220 _last_old_allocated_bytes = 0;
1221
1222 // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
1223 double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
1224
1225 double scan_hcc_time_ms = average_time_ms(G1GCPhaseTimes::ScanHCC);
1226
1227 if (update_rs_time_goal_ms < scan_hcc_time_ms) {
1228 ergo_verbose2(ErgoTiming,
1229 "adjust concurrent refinement thresholds",
1230 ergo_format_reason("Scanning the HCC expected to take longer than Update RS time goal")
1231 ergo_format_ms("Update RS time goal")
1232 ergo_format_ms("Scan HCC time"),
1233 update_rs_time_goal_ms,
1234 scan_hcc_time_ms);
1235
1236 update_rs_time_goal_ms = 0;
1237 } else {
1238 update_rs_time_goal_ms -= scan_hcc_time_ms;
1239 }
1240 adjust_concurrent_refinement(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
1241 phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),
|
1202 size_t last_unrestrained_young_length = 0;
1203 update_young_list_max_and_target_length(&last_unrestrained_young_length);
1204 update_rs_lengths_prediction();
1205
1206 double marking_to_mixed_time = -1.0;
1207 if (!collector_state()->last_gc_was_young() && _initial_mark_to_mixed.has_result()) {
1208 marking_to_mixed_time = _initial_mark_to_mixed.last_marking_time();
1209 assert(marking_to_mixed_time > 0.0,
1210 "Initial mark to mixed time must be larger than zero but is %.3f",
1211 marking_to_mixed_time);
1212 }
1213 // Only update IHOP information on regular GCs.
1214 if (update_stats) {
1215 update_ihop_statistics(marking_to_mixed_time,
1216 app_time_ms / 1000.0,
1217 _last_old_allocated_bytes,
1218 last_unrestrained_young_length * HeapRegion::GrainBytes);
1219 }
1220 _last_old_allocated_bytes = 0;
1221
1222 _ihop_control->send_event(_g1->gc_tracer_stw());
1223
1224 // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
1225 double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
1226
1227 double scan_hcc_time_ms = average_time_ms(G1GCPhaseTimes::ScanHCC);
1228
1229 if (update_rs_time_goal_ms < scan_hcc_time_ms) {
1230 ergo_verbose2(ErgoTiming,
1231 "adjust concurrent refinement thresholds",
1232 ergo_format_reason("Scanning the HCC expected to take longer than Update RS time goal")
1233 ergo_format_ms("Update RS time goal")
1234 ergo_format_ms("Scan HCC time"),
1235 update_rs_time_goal_ms,
1236 scan_hcc_time_ms);
1237
1238 update_rs_time_goal_ms = 0;
1239 } else {
1240 update_rs_time_goal_ms -= scan_hcc_time_ms;
1241 }
1242 adjust_concurrent_refinement(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
1243 phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),
|