3240 } 3241 3242 if (!JDK_Version::is_gte_jdk18x_version()) { 3243 // To avoid changing the log format for 7 updates this flag is only 3244 // true by default in JDK8 and above. 3245 if (FLAG_IS_DEFAULT(PrintGCCause)) { 3246 FLAG_SET_DEFAULT(PrintGCCause, false); 3247 } 3248 } 3249 3250 // Set object alignment values. 3251 set_object_alignment(); 3252 3253 #if !INCLUDE_ALL_GCS 3254 force_serial_gc(); 3255 #endif // INCLUDE_ALL_GCS 3256 #if !INCLUDE_CDS 3257 no_shared_spaces(); 3258 #endif // INCLUDE_CDS 3259 3260 // Set flags based on ergonomics. 3261 set_ergonomics_flags(); 3262 3263 set_shared_spaces_flags(); 3264 3265 // Check the GC selections again. 3266 if (!check_gc_consistency()) { 3267 return JNI_EINVAL; 3268 } 3269 3270 if (TieredCompilation) { 3271 set_tiered_flags(); 3272 } else { 3273 // Check if the policy is valid. Policies 0 and 1 are valid for non-tiered setup. 3274 if (CompilationPolicyChoice >= 2) { 3275 vm_exit_during_initialization( 3276 "Incompatible compilation policy selected", NULL); 3277 } 3278 } 3279 3280 // Set heap size based on available physical memory 3281 set_heap_size(); 3282 3283 #if INCLUDE_ALL_GCS 3284 // Set per-collector flags 3285 if (UseParallelGC || UseParallelOldGC) { 3286 set_parallel_gc_flags(); 3287 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below 3288 set_cms_and_parnew_gc_flags(); 3289 } else if (UseParNewGC) { // skipped if CMS is set above 3290 set_parnew_gc_flags(); 3291 } else if (UseG1GC) { 3292 set_g1_gc_flags(); 3293 } 3294 check_deprecated_gcs(); 3295 #else // INCLUDE_ALL_GCS 3296 assert(verify_serial_gc_flags(), "SerialGC unset"); 3297 #endif // INCLUDE_ALL_GCS 3298 3299 // Set bytecode rewriting flags 3300 set_bytecode_flags(); 3301 3302 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled. | 3240 } 3241 3242 if (!JDK_Version::is_gte_jdk18x_version()) { 3243 // To avoid changing the log format for 7 updates this flag is only 3244 // true by default in JDK8 and above. 3245 if (FLAG_IS_DEFAULT(PrintGCCause)) { 3246 FLAG_SET_DEFAULT(PrintGCCause, false); 3247 } 3248 } 3249 3250 // Set object alignment values. 3251 set_object_alignment(); 3252 3253 #if !INCLUDE_ALL_GCS 3254 force_serial_gc(); 3255 #endif // INCLUDE_ALL_GCS 3256 #if !INCLUDE_CDS 3257 no_shared_spaces(); 3258 #endif // INCLUDE_CDS 3259 3260 // Set heap size based on available physical memory 3261 set_heap_size(); 3262 3263 // Set flags based on ergonomics. 3264 set_ergonomics_flags(); 3265 3266 set_shared_spaces_flags(); 3267 3268 // Check the GC selections again. 3269 if (!check_gc_consistency()) { 3270 return JNI_EINVAL; 3271 } 3272 3273 if (TieredCompilation) { 3274 set_tiered_flags(); 3275 } else { 3276 // Check if the policy is valid. Policies 0 and 1 are valid for non-tiered setup. 3277 if (CompilationPolicyChoice >= 2) { 3278 vm_exit_during_initialization( 3279 "Incompatible compilation policy selected", NULL); 3280 } 3281 } 3282 3283 #if INCLUDE_ALL_GCS 3284 // Set per-collector flags 3285 if (UseParallelGC || UseParallelOldGC) { 3286 set_parallel_gc_flags(); 3287 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below 3288 set_cms_and_parnew_gc_flags(); 3289 } else if (UseParNewGC) { // skipped if CMS is set above 3290 set_parnew_gc_flags(); 3291 } else if (UseG1GC) { 3292 set_g1_gc_flags(); 3293 } 3294 check_deprecated_gcs(); 3295 #else // INCLUDE_ALL_GCS 3296 assert(verify_serial_gc_flags(), "SerialGC unset"); 3297 #endif // INCLUDE_ALL_GCS 3298 3299 // Set bytecode rewriting flags 3300 set_bytecode_flags(); 3301 3302 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled. |