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

Print this page




 250   // Then, if the interval parameter was not set, set it according to
 251   // the pause time target (this will also deal with the case when the
 252   // pause time target is the default value).
 253   if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
 254     FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
 255   }
 256 
 257   // Finally, make sure that the two parameters are consistent.
 258   if (MaxGCPauseMillis >= GCPauseIntervalMillis) {
 259     char buffer[256];
 260     jio_snprintf(buffer, 256,
 261                  "MaxGCPauseMillis (%u) should be less than "
 262                  "GCPauseIntervalMillis (%u)",
 263                  MaxGCPauseMillis, GCPauseIntervalMillis);
 264     vm_exit_during_initialization(buffer);
 265   }
 266 
 267   double max_gc_time = (double) MaxGCPauseMillis / 1000.0;
 268   double time_slice  = (double) GCPauseIntervalMillis / 1000.0;
 269   _mmu_tracker = new G1MMUTrackerQueue(time_slice, max_gc_time);
 270   _sigma = (double) G1ConfidencePercent / 100.0;
 271 















 272   // start conservatively (around 50ms is about right)
 273   _concurrent_mark_remark_times_ms->add(0.05);
 274   _concurrent_mark_cleanup_times_ms->add(0.20);
 275   _tenuring_threshold = MaxTenuringThreshold;
 276   // _max_survivor_regions will be calculated by
 277   // update_young_list_target_length() during initialization.
 278   _max_survivor_regions = 0;
 279 
 280   assert(GCTimeRatio > 0,
 281          "we should have set it to a default value set_g1_gc_flags() "
 282          "if a user set it to 0");
 283   _gc_overhead_perc = 100.0 * (1.0 / (1.0 + GCTimeRatio));
 284 
 285   uintx reserve_perc = G1ReservePercent;
 286   // Put an artificial ceiling on this so that it's not set to a silly value.
 287   if (reserve_perc > 50) {
 288     reserve_perc = 50;
 289     warning("G1ReservePercent is set to a value that is too large, "
 290             "it's been updated to %u", reserve_perc);
 291   }




 250   // Then, if the interval parameter was not set, set it according to
 251   // the pause time target (this will also deal with the case when the
 252   // pause time target is the default value).
 253   if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
 254     FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
 255   }
 256 
 257   // Finally, make sure that the two parameters are consistent.
 258   if (MaxGCPauseMillis >= GCPauseIntervalMillis) {
 259     char buffer[256];
 260     jio_snprintf(buffer, 256,
 261                  "MaxGCPauseMillis (%u) should be less than "
 262                  "GCPauseIntervalMillis (%u)",
 263                  MaxGCPauseMillis, GCPauseIntervalMillis);
 264     vm_exit_during_initialization(buffer);
 265   }
 266 
 267   double max_gc_time = (double) MaxGCPauseMillis / 1000.0;
 268   double time_slice  = (double) GCPauseIntervalMillis / 1000.0;
 269   _mmu_tracker = new G1MMUTrackerQueue(time_slice, max_gc_time);

 270 
 271   intx confidence_perc = G1ConfidencePercent;
 272   // Put an artificial ceiling on this so that it's not set to a silly value.
 273   if (confidence_perc > 100) {
 274     confidence_perc = 100;
 275     warning("G1ConfidencePercent is set to a value that is too large, "
 276             "it's been updated to %u", confidence_perc);
 277   }
 278   // Put an artificial flooring on this so that it's not set to a silly value.
 279   if (confidence_perc < 0) {
 280     confidence_perc = 0;
 281     warning("G1ConfidencePercent is set to a value that is too small, "
 282             "it's been updated to %u", confidence_perc);
 283   }
 284   _sigma = (double) confidence_perc / 100.0;
 285 
 286   // start conservatively (around 50ms is about right)
 287   _concurrent_mark_remark_times_ms->add(0.05);
 288   _concurrent_mark_cleanup_times_ms->add(0.20);
 289   _tenuring_threshold = MaxTenuringThreshold;
 290   // _max_survivor_regions will be calculated by
 291   // update_young_list_target_length() during initialization.
 292   _max_survivor_regions = 0;
 293 
 294   assert(GCTimeRatio > 0,
 295          "we should have set it to a default value set_g1_gc_flags() "
 296          "if a user set it to 0");
 297   _gc_overhead_perc = 100.0 * (1.0 / (1.0 + GCTimeRatio));
 298 
 299   uintx reserve_perc = G1ReservePercent;
 300   // Put an artificial ceiling on this so that it's not set to a silly value.
 301   if (reserve_perc > 50) {
 302     reserve_perc = 50;
 303     warning("G1ReservePercent is set to a value that is too large, "
 304             "it's been updated to %u", reserve_perc);
 305   }