src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc-g1-mmap Sdiff src/share/vm/gc_implementation/g1

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

Print this page




 148   _inc_cset_recorded_rs_lengths_diffs(0),
 149   _inc_cset_predicted_elapsed_time_ms(0.0),
 150   _inc_cset_predicted_elapsed_time_ms_diffs(0.0),
 151 
 152 #ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
 153 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list
 154 #endif // _MSC_VER
 155 
 156   _short_lived_surv_rate_group(new SurvRateGroup(this, "Short Lived",
 157                                                  G1YoungSurvRateNumRegionsSummary)),
 158   _survivor_surv_rate_group(new SurvRateGroup(this, "Survivor",
 159                                               G1YoungSurvRateNumRegionsSummary)),
 160   // add here any more surv rate groups
 161   _recorded_survivor_regions(0),
 162   _recorded_survivor_head(NULL),
 163   _recorded_survivor_tail(NULL),
 164   _survivors_age_table(true),
 165 
 166   _gc_overhead_perc(0.0) {
 167 


 168   // Set up the region size and associated fields. Given that the
 169   // policy is created before the heap, we have to set this up here,
 170   // so it's done as soon as possible.
 171   HeapRegion::setup_heap_region_size(Arguments::min_heap_size());








 172   HeapRegionRemSet::setup_remset_size();
 173 
 174   G1ErgoVerbose::initialize();
 175   if (PrintAdaptiveSizePolicy) {
 176     // Currently, we only use a single switch for all the heuristics.
 177     G1ErgoVerbose::set_enabled(true);
 178     // Given that we don't currently have a verboseness level
 179     // parameter, we'll hardcode this to high. This can be easily
 180     // changed in the future.
 181     G1ErgoVerbose::set_level(ErgoHigh);
 182   } else {
 183     G1ErgoVerbose::set_enabled(false);
 184   }
 185 
 186   // Verify PLAB sizes
 187   const size_t region_size = HeapRegion::GrainWords;
 188   if (YoungPLABSize > region_size || OldPLABSize > region_size) {
 189     char buffer[128];
 190     jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most "SIZE_FORMAT,
 191                  OldPLABSize > region_size ? "Old" : "Young", region_size);




 148   _inc_cset_recorded_rs_lengths_diffs(0),
 149   _inc_cset_predicted_elapsed_time_ms(0.0),
 150   _inc_cset_predicted_elapsed_time_ms_diffs(0.0),
 151 
 152 #ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
 153 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list
 154 #endif // _MSC_VER
 155 
 156   _short_lived_surv_rate_group(new SurvRateGroup(this, "Short Lived",
 157                                                  G1YoungSurvRateNumRegionsSummary)),
 158   _survivor_surv_rate_group(new SurvRateGroup(this, "Survivor",
 159                                               G1YoungSurvRateNumRegionsSummary)),
 160   // add here any more surv rate groups
 161   _recorded_survivor_regions(0),
 162   _recorded_survivor_head(NULL),
 163   _recorded_survivor_tail(NULL),
 164   _survivors_age_table(true),
 165 
 166   _gc_overhead_perc(0.0) {
 167 
 168   G1Log::init();
 169 
 170   // Set up the region size and associated fields. Given that the
 171   // policy is created before the heap, we have to set this up here,
 172   // so it's done as soon as possible
 173 
 174   // It would have been natural to pass initial_heap_byte_size() and
 175   // max_heap_byte_size() to setup_heap_region_size() but those have
 176   // not been set up at this point since they should be aligned with
 177   // the region size. So, there is a circular dependency here. We base
 178   // the region size on the heap size, but the heap size should be
 179   // aligned with the region size. To get around this we use the
 180   // unaligned values for the heap.
 181   HeapRegion::setup_heap_region_size(InitialHeapSize, MaxHeapSize);
 182   HeapRegionRemSet::setup_remset_size();
 183 
 184   G1ErgoVerbose::initialize();
 185   if (PrintAdaptiveSizePolicy) {
 186     // Currently, we only use a single switch for all the heuristics.
 187     G1ErgoVerbose::set_enabled(true);
 188     // Given that we don't currently have a verboseness level
 189     // parameter, we'll hardcode this to high. This can be easily
 190     // changed in the future.
 191     G1ErgoVerbose::set_level(ErgoHigh);
 192   } else {
 193     G1ErgoVerbose::set_enabled(false);
 194   }
 195 
 196   // Verify PLAB sizes
 197   const size_t region_size = HeapRegion::GrainWords;
 198   if (YoungPLABSize > region_size || OldPLABSize > region_size) {
 199     char buffer[128];
 200     jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most "SIZE_FORMAT,
 201                  OldPLABSize > region_size ? "Old" : "Young", region_size);


src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File