< prev index next >

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

Print this page
rev 9402 : dihop-changes
rev 9404 : imported patch erik-jmasa-review
rev 9405 : imported patch 8136678-implement-adaptive-sizing-algorithm-for-IHOP
rev 9407 : [mq]: erik-jon-review


1235     ergo_verbose2(ErgoTiming,
1236                   "adjust concurrent refinement thresholds",
1237                   ergo_format_reason("Scanning the HCC expected to take longer than Update RS time goal")
1238                   ergo_format_ms("Update RS time goal")
1239                   ergo_format_ms("Scan HCC time"),
1240                   update_rs_time_goal_ms,
1241                   scan_hcc_time_ms);
1242 
1243     update_rs_time_goal_ms = 0;
1244   } else {
1245     update_rs_time_goal_ms -= scan_hcc_time_ms;
1246   }
1247   adjust_concurrent_refinement(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
1248                                phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),
1249                                update_rs_time_goal_ms);
1250 
1251   _collectionSetChooser->verify();
1252 }
1253 
1254 G1IHOPControl* G1CollectorPolicy::create_ihop_control() const {







1255   return new G1StaticIHOPControl(InitiatingHeapOccupancyPercent,
1256                                  G1CollectedHeap::heap()->max_capacity());

1257 }
1258 
1259 void G1CollectorPolicy::update_ihop_statistics(double marking_time,
1260                                                double mutator_time_s,
1261                                                size_t mutator_alloc_bytes,
1262                                                size_t young_gen_size) {
1263   bool report = false;
1264 
1265   // To avoid using really small times that may be caused by e.g. back-to-back gcs
1266   // we filter them out.
1267   double const min_valid_time = 1e-6;
1268 
1269   if (marking_time > min_valid_time) {
1270     _ihop_control->update_marking_length(marking_time);
1271     report = true;
1272   }
1273 
1274   // As an approximation for the young gc promotion rates during marking we use
1275   // all of them. In many applications there are only a few if any young gcs during
1276   // marking, which makes any prediction useless. This increases the accuracy of the




1235     ergo_verbose2(ErgoTiming,
1236                   "adjust concurrent refinement thresholds",
1237                   ergo_format_reason("Scanning the HCC expected to take longer than Update RS time goal")
1238                   ergo_format_ms("Update RS time goal")
1239                   ergo_format_ms("Scan HCC time"),
1240                   update_rs_time_goal_ms,
1241                   scan_hcc_time_ms);
1242 
1243     update_rs_time_goal_ms = 0;
1244   } else {
1245     update_rs_time_goal_ms -= scan_hcc_time_ms;
1246   }
1247   adjust_concurrent_refinement(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms,
1248                                phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS),
1249                                update_rs_time_goal_ms);
1250 
1251   _collectionSetChooser->verify();
1252 }
1253 
1254 G1IHOPControl* G1CollectorPolicy::create_ihop_control() const {
1255   if (G1UseAdaptiveIHOP) {
1256     return new G1AdaptiveIHOPControl(InitiatingHeapOccupancyPercent,
1257                                      G1CollectedHeap::heap()->max_capacity(),
1258                                      &_predictor,
1259                                      G1ReservePercent,
1260                                      G1HeapWastePercent);
1261   } else {
1262     return new G1StaticIHOPControl(InitiatingHeapOccupancyPercent,
1263                                    G1CollectedHeap::heap()->max_capacity());
1264   }
1265 }
1266 
1267 void G1CollectorPolicy::update_ihop_statistics(double marking_time,
1268                                                double mutator_time_s,
1269                                                size_t mutator_alloc_bytes,
1270                                                size_t young_gen_size) {
1271   bool report = false;
1272 
1273   // To avoid using really small times that may be caused by e.g. back-to-back gcs
1274   // we filter them out.
1275   double const min_valid_time = 1e-6;
1276 
1277   if (marking_time > min_valid_time) {
1278     _ihop_control->update_marking_length(marking_time);
1279     report = true;
1280   }
1281 
1282   // As an approximation for the young gc promotion rates during marking we use
1283   // all of them. In many applications there are only a few if any young gcs during
1284   // marking, which makes any prediction useless. This increases the accuracy of the


< prev index next >