161
162 // TLAB sizing policy makes resizing decisions before each GC cycle. It averages
163 // historical data, assigning more recent data the weight according to TLABAllocationWeight.
164 // Current default is good for generational collectors that run frequent young GCs.
165 // With Shenandoah, GC cycles are much less frequent, so we need we need sizing policy
166 // to converge faster over smaller number of resizing decisions.
167 if (FLAG_IS_DEFAULT(TLABAllocationWeight)) {
168 FLAG_SET_DEFAULT(TLABAllocationWeight, 90);
169 }
170 }
171
172 size_t ShenandoahArguments::conservative_max_heap_alignment() {
173 size_t align = ShenandoahMaxRegionSize;
174 if (UseLargePages) {
175 align = MAX2(align, os::large_page_size());
176 }
177 return align;
178 }
179
180 void ShenandoahArguments::initialize_alignments() {
181 // Need to setup sizes early to get correct alignments.
182 MaxHeapSize = ShenandoahHeapRegion::setup_sizes(MaxHeapSize);
183
184 // This is expected by our algorithm for ShenandoahHeap::heap_region_containing().
185 size_t align = ShenandoahHeapRegion::region_size_bytes();
186 if (UseLargePages) {
187 align = MAX2(align, os::large_page_size());
188 }
189 SpaceAlignment = align;
190 HeapAlignment = align;
191 }
192
193 CollectedHeap* ShenandoahArguments::create_heap() {
194 return new ShenandoahHeap(new ShenandoahCollectorPolicy());
195 }
|
161
162 // TLAB sizing policy makes resizing decisions before each GC cycle. It averages
163 // historical data, assigning more recent data the weight according to TLABAllocationWeight.
164 // Current default is good for generational collectors that run frequent young GCs.
165 // With Shenandoah, GC cycles are much less frequent, so we need we need sizing policy
166 // to converge faster over smaller number of resizing decisions.
167 if (FLAG_IS_DEFAULT(TLABAllocationWeight)) {
168 FLAG_SET_DEFAULT(TLABAllocationWeight, 90);
169 }
170 }
171
172 size_t ShenandoahArguments::conservative_max_heap_alignment() {
173 size_t align = ShenandoahMaxRegionSize;
174 if (UseLargePages) {
175 align = MAX2(align, os::large_page_size());
176 }
177 return align;
178 }
179
180 void ShenandoahArguments::initialize_alignments() {
181 CardTable::initialize_card_size();
182
183 // Need to setup sizes early to get correct alignments.
184 MaxHeapSize = ShenandoahHeapRegion::setup_sizes(MaxHeapSize);
185
186 // This is expected by our algorithm for ShenandoahHeap::heap_region_containing().
187 size_t align = ShenandoahHeapRegion::region_size_bytes();
188 if (UseLargePages) {
189 align = MAX2(align, os::large_page_size());
190 }
191 SpaceAlignment = align;
192 HeapAlignment = align;
193 }
194
195 CollectedHeap* ShenandoahArguments::create_heap() {
196 return new ShenandoahHeap(new ShenandoahCollectorPolicy());
197 }
|