3641 return JNI_EINVAL;
3642 }
3643
3644 // Final check of all 'AfterErgo' constraints after ergonomics which may change values.
3645 bool constraint_result = CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::AfterErgo);
3646 if (!constraint_result) {
3647 return JNI_EINVAL;
3648 }
3649
3650 CommandLineFlagWriteableList::mark_startup();
3651
3652 if (PauseAtStartup) {
3653 os::pause();
3654 }
3655
3656 HOTSPOT_VM_INIT_BEGIN();
3657
3658 // Timing (must come after argument parsing)
3659 TraceTime timer("Create VM", TRACETIME_LOG(Info, startuptime));
3660
3661 // Initialize the os module after parsing the args
3662 jint os_init_2_result = os::init_2();
3663 if (os_init_2_result != JNI_OK) return os_init_2_result;
3664
3665 SafepointMechanism::initialize();
3666
3667 jint adjust_after_os_result = Arguments::adjust_after_os();
3668 if (adjust_after_os_result != JNI_OK) return adjust_after_os_result;
3669
3670 // Initialize output stream logging
3671 ostream_init_log();
3672
3673 // Convert -Xrun to -agentlib: if there is no JVM_OnLoad
3674 // Must be before create_vm_init_agents()
3675 if (Arguments::init_libraries_at_startup()) {
3676 convert_vm_init_libraries_to_agents();
3677 }
3678
3679 // Launch -agentlib/-agentpath and converted -Xrun agents
3680 if (Arguments::init_agents_at_startup()) {
|
3641 return JNI_EINVAL;
3642 }
3643
3644 // Final check of all 'AfterErgo' constraints after ergonomics which may change values.
3645 bool constraint_result = CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::AfterErgo);
3646 if (!constraint_result) {
3647 return JNI_EINVAL;
3648 }
3649
3650 CommandLineFlagWriteableList::mark_startup();
3651
3652 if (PauseAtStartup) {
3653 os::pause();
3654 }
3655
3656 HOTSPOT_VM_INIT_BEGIN();
3657
3658 // Timing (must come after argument parsing)
3659 TraceTime timer("Create VM", TRACETIME_LOG(Info, startuptime));
3660
3661 // Initialize assert poison page mechanism.
3662 #ifdef CAN_SHOW_REGISTERS_ON_ASSERT
3663 if (ShowRegistersOnAssert) {
3664 initialize_assert_poison();
3665 }
3666 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
3667
3668 // Initialize the os module after parsing the args
3669 jint os_init_2_result = os::init_2();
3670 if (os_init_2_result != JNI_OK) return os_init_2_result;
3671
3672 SafepointMechanism::initialize();
3673
3674 jint adjust_after_os_result = Arguments::adjust_after_os();
3675 if (adjust_after_os_result != JNI_OK) return adjust_after_os_result;
3676
3677 // Initialize output stream logging
3678 ostream_init_log();
3679
3680 // Convert -Xrun to -agentlib: if there is no JVM_OnLoad
3681 // Must be before create_vm_init_agents()
3682 if (Arguments::init_libraries_at_startup()) {
3683 convert_vm_init_libraries_to_agents();
3684 }
3685
3686 // Launch -agentlib/-agentpath and converted -Xrun agents
3687 if (Arguments::init_agents_at_startup()) {
|