171 // Current default is good for generational collectors that run frequent young GCs.
172 // With Shenandoah, GC cycles are much less frequent, so we need we need sizing policy
173 // to converge faster over smaller number of resizing decisions.
174 if (strcmp(ShenandoahGCMode, "generational") && FLAG_IS_DEFAULT(TLABAllocationWeight)) {
175 FLAG_SET_DEFAULT(TLABAllocationWeight, 90);
176 }
177 // In generational mode, let TLABAllocationWeight keeps its default value of 35.
178
179 if (GCCardSizeInBytes < ShenandoahMinCardSizeInBytes) {
180 vm_exit_during_initialization(
181 err_msg("GCCardSizeInBytes ( %u ) must be >= %u\n", GCCardSizeInBytes, (unsigned int) ShenandoahMinCardSizeInBytes));
182 }
183
184 // Gen shen does not support any ShenandoahGCHeuristics value except for the default "adaptive"
185 if ((strcmp(ShenandoahGCMode, "generational") == 0)
186 && strcmp(ShenandoahGCHeuristics, "adaptive") != 0) {
187 log_warning(gc)("Ignoring -XX:ShenandoahGCHeuristics input: %s, because generational shenandoah only"
188 " supports adaptive heuristics", ShenandoahGCHeuristics);
189 }
190
191 FullGCForwarding::initialize_flags(MaxHeapSize);
192 }
193
194 size_t ShenandoahArguments::conservative_max_heap_alignment() {
195 size_t align = next_power_of_2(ShenandoahMaxRegionSize);
196 if (UseLargePages) {
197 align = MAX2(align, os::large_page_size());
198 }
199 return align;
200 }
201
202 void ShenandoahArguments::initialize_alignments() {
203 CardTable::initialize_card_size();
204
205 // Need to setup sizes early to get correct alignments.
206 MaxHeapSize = ShenandoahHeapRegion::setup_sizes(MaxHeapSize);
207
208 // This is expected by our algorithm for ShenandoahHeap::heap_region_containing().
209 size_t align = ShenandoahHeapRegion::region_size_bytes();
210 if (UseLargePages) {
|
171 // Current default is good for generational collectors that run frequent young GCs.
172 // With Shenandoah, GC cycles are much less frequent, so we need we need sizing policy
173 // to converge faster over smaller number of resizing decisions.
174 if (strcmp(ShenandoahGCMode, "generational") && FLAG_IS_DEFAULT(TLABAllocationWeight)) {
175 FLAG_SET_DEFAULT(TLABAllocationWeight, 90);
176 }
177 // In generational mode, let TLABAllocationWeight keeps its default value of 35.
178
179 if (GCCardSizeInBytes < ShenandoahMinCardSizeInBytes) {
180 vm_exit_during_initialization(
181 err_msg("GCCardSizeInBytes ( %u ) must be >= %u\n", GCCardSizeInBytes, (unsigned int) ShenandoahMinCardSizeInBytes));
182 }
183
184 // Gen shen does not support any ShenandoahGCHeuristics value except for the default "adaptive"
185 if ((strcmp(ShenandoahGCMode, "generational") == 0)
186 && strcmp(ShenandoahGCHeuristics, "adaptive") != 0) {
187 log_warning(gc)("Ignoring -XX:ShenandoahGCHeuristics input: %s, because generational shenandoah only"
188 " supports adaptive heuristics", ShenandoahGCHeuristics);
189 }
190
191 if (ShenandoahGCStateCheckHotpatch && NMethodRelocation) {
192 log_warning(gc)("Hot patching is not yet supported with NMethod relocation, disabling");
193 FLAG_SET_DEFAULT(ShenandoahGCStateCheckHotpatch, false);
194 }
195
196 FullGCForwarding::initialize_flags(MaxHeapSize);
197 }
198
199 size_t ShenandoahArguments::conservative_max_heap_alignment() {
200 size_t align = next_power_of_2(ShenandoahMaxRegionSize);
201 if (UseLargePages) {
202 align = MAX2(align, os::large_page_size());
203 }
204 return align;
205 }
206
207 void ShenandoahArguments::initialize_alignments() {
208 CardTable::initialize_card_size();
209
210 // Need to setup sizes early to get correct alignments.
211 MaxHeapSize = ShenandoahHeapRegion::setup_sizes(MaxHeapSize);
212
213 // This is expected by our algorithm for ShenandoahHeap::heap_region_containing().
214 size_t align = ShenandoahHeapRegion::region_size_bytes();
215 if (UseLargePages) {
|