3314
3315 // Update/Initialize System properties after JDK version number is known
3316 Arguments::init_version_specific_system_properties();
3317
3318 // Parse arguments
3319 jint parse_result = Arguments::parse(args);
3320 if (parse_result != JNI_OK) return parse_result;
3321
3322 os::init_before_ergo();
3323
3324 jint ergo_result = Arguments::apply_ergo();
3325 if (ergo_result != JNI_OK) return ergo_result;
3326
3327 // Final check of all ranges after ergonomics which may change values.
3328 if (!CommandLineFlagRangeList::check_ranges()) {
3329 return JNI_EINVAL;
3330 }
3331
3332 // Final check of all 'AfterErgo' constraints after ergonomics which may change values.
3333 bool constraint_result = CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::AfterErgo);
3334 Arguments::post_after_ergo_constraint_check(constraint_result);
3335 if (!constraint_result) {
3336 return JNI_EINVAL;
3337 }
3338
3339 if (PauseAtStartup) {
3340 os::pause();
3341 }
3342
3343 HOTSPOT_VM_INIT_BEGIN();
3344
3345 // Record VM creation timing statistics
3346 TraceVmCreationTime create_vm_timer;
3347 create_vm_timer.start();
3348
3349 // Timing (must come after argument parsing)
3350 TraceTime timer("Create VM", TraceStartupTime);
3351
3352 // Initialize the os module after parsing the args
3353 jint os_init_2_result = os::init_2();
3354 if (os_init_2_result != JNI_OK) return os_init_2_result;
|
3314
3315 // Update/Initialize System properties after JDK version number is known
3316 Arguments::init_version_specific_system_properties();
3317
3318 // Parse arguments
3319 jint parse_result = Arguments::parse(args);
3320 if (parse_result != JNI_OK) return parse_result;
3321
3322 os::init_before_ergo();
3323
3324 jint ergo_result = Arguments::apply_ergo();
3325 if (ergo_result != JNI_OK) return ergo_result;
3326
3327 // Final check of all ranges after ergonomics which may change values.
3328 if (!CommandLineFlagRangeList::check_ranges()) {
3329 return JNI_EINVAL;
3330 }
3331
3332 // Final check of all 'AfterErgo' constraints after ergonomics which may change values.
3333 bool constraint_result = CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::AfterErgo);
3334 if (!constraint_result) {
3335 return JNI_EINVAL;
3336 }
3337
3338 if (PauseAtStartup) {
3339 os::pause();
3340 }
3341
3342 HOTSPOT_VM_INIT_BEGIN();
3343
3344 // Record VM creation timing statistics
3345 TraceVmCreationTime create_vm_timer;
3346 create_vm_timer.start();
3347
3348 // Timing (must come after argument parsing)
3349 TraceTime timer("Create VM", TraceStartupTime);
3350
3351 // Initialize the os module after parsing the args
3352 jint os_init_2_result = os::init_2();
3353 if (os_init_2_result != JNI_OK) return os_init_2_result;
|