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); | 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 172 // It would have been natural to pass initial_heap_byte_size() and 173 // max_heap_byte_size() to setup_heap_region_size() but those have 174 // not been set up at this point since they should be aligned with 175 // the region size. So, there is a circular dependency here. We base 176 // the region size on the heap size, but the heap size should be 177 // aligned with the region size. To get around this we use the 178 // unaligned values for the heap. 179 HeapRegion::setup_heap_region_size(InitialHeapSize, MaxHeapSize); 180 HeapRegionRemSet::setup_remset_size(); 181 182 G1ErgoVerbose::initialize(); 183 if (PrintAdaptiveSizePolicy) { 184 // Currently, we only use a single switch for all the heuristics. 185 G1ErgoVerbose::set_enabled(true); 186 // Given that we don't currently have a verboseness level 187 // parameter, we'll hardcode this to high. This can be easily 188 // changed in the future. 189 G1ErgoVerbose::set_level(ErgoHigh); 190 } else { 191 G1ErgoVerbose::set_enabled(false); 192 } 193 194 // Verify PLAB sizes 195 const size_t region_size = HeapRegion::GrainWords; 196 if (YoungPLABSize > region_size || OldPLABSize > region_size) { 197 char buffer[128]; 198 jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most "SIZE_FORMAT, 199 OldPLABSize > region_size ? "Old" : "Young", region_size); |