comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 12178:84683e78e713

8019902: G1: Use the average heap size rather than the minimum heap size to calculate the region size Reviewed-by: tonyp, tschatzl, sjohanss
author brutisso
date Fri, 30 Aug 2013 07:31:47 +0200
parents 4c84d351cca9
children 9b4d0569f2f4
comparison
equal deleted inserted replaced
12177:0d59407e7e09 12178:84683e78e713
166 _gc_overhead_perc(0.0) { 166 _gc_overhead_perc(0.0) {
167 167
168 // Set up the region size and associated fields. Given that the 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, 169 // policy is created before the heap, we have to set this up here,
170 // so it's done as soon as possible. 170 // so it's done as soon as possible.
171 HeapRegion::setup_heap_region_size(Arguments::min_heap_size()); 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);
172 HeapRegionRemSet::setup_remset_size(); 180 HeapRegionRemSet::setup_remset_size();
173 181
174 G1ErgoVerbose::initialize(); 182 G1ErgoVerbose::initialize();
175 if (PrintAdaptiveSizePolicy) { 183 if (PrintAdaptiveSizePolicy) {
176 // Currently, we only use a single switch for all the heuristics. 184 // Currently, we only use a single switch for all the heuristics.