< prev index next >

src/share/vm/gc/g1/g1CollectorPolicy.cpp

Print this page
rev 9277 : imported patch 8140597-forcing-initial-mark-causes-abort-mixed-collections
rev 9278 : imported patch 8139874-after-full-gc-next-gc-is-always-young-only
rev 9279 : imported patch 8138740-start-initial-mark-right-after-mixed-gc-if-needed
rev 9281 : imported patch 8140689-skip-last-young-if-nothing-to-do-in-mixed
rev 9282 : dihop-changes
rev 9284 : imported patch 8136678-implement-adaptive-sizing-algorithm-for-IHOP
rev 9286 : imported patch 8136679-jfr-event-for-dynamic-ihop


1215   size_t last_unrestrained_young_length = 0;
1216   update_young_list_max_and_target_length(&last_unrestrained_young_length);
1217   update_rs_lengths_prediction();
1218 
1219   double marking_to_mixed_time = -1.0;
1220   if (!collector_state()->last_gc_was_young() && _initial_mark_to_mixed.has_result()) {
1221     marking_to_mixed_time = _initial_mark_to_mixed.last_marking_time();
1222     assert(marking_to_mixed_time > 0.0,
1223            "Initial mark to mixed time must be larger than zero but is %.3f",
1224            marking_to_mixed_time);
1225   }
1226   // Only update IHOP information on regular GCs.
1227   if (update_stats) {
1228     update_ihop_statistics(marking_to_mixed_time,
1229                            app_time_ms / 1000.0,
1230                            _last_old_allocated_bytes,
1231                            last_unrestrained_young_length * HeapRegion::GrainBytes);
1232   }
1233   _last_old_allocated_bytes = 0;
1234 


1235   // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
1236   double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
1237 
1238   double scan_hcc_time_ms = average_time_ms(G1GCPhaseTimes::ScanHCC);
1239 
1240   if (update_rs_time_goal_ms < scan_hcc_time_ms) {
1241     ergo_verbose2(ErgoTiming,
1242                   "adjust concurrent refinement thresholds",
1243                   ergo_format_reason("Scanning the HCC expected to take longer than Update RS time goal")
1244                   ergo_format_ms("Update RS time goal")
1245                   ergo_format_ms("Scan HCC time"),
1246                   update_rs_time_goal_ms,
1247                   scan_hcc_time_ms);
1248 
1249     update_rs_time_goal_ms = 0;
1250   } else {
1251     update_rs_time_goal_ms -= scan_hcc_time_ms;
1252   }
1253   adjust_concurrent_refinement(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
1254                                phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),




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


< prev index next >