81 SystemProperty* Arguments::_system_properties = NULL; 82 const char* Arguments::_gc_log_filename = NULL; 83 size_t Arguments::_conservative_max_heap_alignment = 0; 84 size_t Arguments::_min_heap_size = 0; 85 Arguments::Mode Arguments::_mode = _mixed; 86 bool Arguments::_java_compiler = false; 87 bool Arguments::_xdebug_mode = false; 88 const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG; 89 const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER; 90 int Arguments::_sun_java_launcher_pid = -1; 91 bool Arguments::_sun_java_launcher_is_altjvm = false; 92 93 // These parameters are reset in method parse_vm_init_args() 94 bool Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; 95 bool Arguments::_UseOnStackReplacement = UseOnStackReplacement; 96 bool Arguments::_BackgroundCompilation = BackgroundCompilation; 97 bool Arguments::_ClipInlining = ClipInlining; 98 intx Arguments::_Tier3InvokeNotifyFreqLog = Tier3InvokeNotifyFreqLog; 99 intx Arguments::_Tier4InvocationThreshold = Tier4InvocationThreshold; 100 101 char* Arguments::SharedArchivePath = NULL; 102 103 AgentLibraryList Arguments::_libraryList; 104 AgentLibraryList Arguments::_agentList; 105 106 abort_hook_t Arguments::_abort_hook = NULL; 107 exit_hook_t Arguments::_exit_hook = NULL; 108 vfprintf_hook_t Arguments::_vfprintf_hook = NULL; 109 110 111 SystemProperty *Arguments::_sun_boot_library_path = NULL; 112 SystemProperty *Arguments::_java_library_path = NULL; 113 SystemProperty *Arguments::_java_home = NULL; 114 SystemProperty *Arguments::_java_class_path = NULL; 115 SystemProperty *Arguments::_jdk_boot_class_path_append = NULL; 116 117 GrowableArray<ModulePatchPath*> *Arguments::_patch_mod_prefix = NULL; 118 PathString *Arguments::_system_boot_class_path = NULL; 119 bool Arguments::_has_jimage = false; 120 2759 add_init_agent(name, options, is_absolute_path); 2760 } 2761 // -javaagent 2762 } else if (match_option(option, "-javaagent:", &tail)) { 2763 #if !INCLUDE_JVMTI 2764 jio_fprintf(defaultStream::error_stream(), 2765 "Instrumentation agents are not supported in this VM\n"); 2766 return JNI_ERR; 2767 #else 2768 if (tail != NULL) { 2769 size_t length = strlen(tail) + 1; 2770 char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments); 2771 jio_snprintf(options, length, "%s", tail); 2772 add_instrument_agent("instrument", options, false); 2773 // java agents need module java.instrument 2774 if (!create_numbered_property("jdk.module.addmods", "java.instrument", addmods_count++)) { 2775 return JNI_ENOMEM; 2776 } 2777 } 2778 #endif // !INCLUDE_JVMTI 2779 // -Xnoclassgc 2780 } else if (match_option(option, "-Xnoclassgc")) { 2781 if (FLAG_SET_CMDLINE(bool, ClassUnloading, false) != Flag::SUCCESS) { 2782 return JNI_EINVAL; 2783 } 2784 // -Xconcgc 2785 } else if (match_option(option, "-Xconcgc")) { 2786 if (FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, true) != Flag::SUCCESS) { 2787 return JNI_EINVAL; 2788 } 2789 handle_extra_cms_flags("-Xconcgc uses UseConcMarkSweepGC"); 2790 // -Xnoconcgc 2791 } else if (match_option(option, "-Xnoconcgc")) { 2792 if (FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, false) != Flag::SUCCESS) { 2793 return JNI_EINVAL; 2794 } 2795 handle_extra_cms_flags("-Xnoconcgc uses UseConcMarkSweepGC"); 2796 // -Xbatch 2797 } else if (match_option(option, "-Xbatch")) { 2798 if (FLAG_SET_CMDLINE(bool, BackgroundCompilation, false) != Flag::SUCCESS) { | 81 SystemProperty* Arguments::_system_properties = NULL; 82 const char* Arguments::_gc_log_filename = NULL; 83 size_t Arguments::_conservative_max_heap_alignment = 0; 84 size_t Arguments::_min_heap_size = 0; 85 Arguments::Mode Arguments::_mode = _mixed; 86 bool Arguments::_java_compiler = false; 87 bool Arguments::_xdebug_mode = false; 88 const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG; 89 const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER; 90 int Arguments::_sun_java_launcher_pid = -1; 91 bool Arguments::_sun_java_launcher_is_altjvm = false; 92 93 // These parameters are reset in method parse_vm_init_args() 94 bool Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; 95 bool Arguments::_UseOnStackReplacement = UseOnStackReplacement; 96 bool Arguments::_BackgroundCompilation = BackgroundCompilation; 97 bool Arguments::_ClipInlining = ClipInlining; 98 intx Arguments::_Tier3InvokeNotifyFreqLog = Tier3InvokeNotifyFreqLog; 99 intx Arguments::_Tier4InvocationThreshold = Tier4InvocationThreshold; 100 101 bool Arguments::_enable_preview = false; 102 103 char* Arguments::SharedArchivePath = NULL; 104 105 AgentLibraryList Arguments::_libraryList; 106 AgentLibraryList Arguments::_agentList; 107 108 abort_hook_t Arguments::_abort_hook = NULL; 109 exit_hook_t Arguments::_exit_hook = NULL; 110 vfprintf_hook_t Arguments::_vfprintf_hook = NULL; 111 112 113 SystemProperty *Arguments::_sun_boot_library_path = NULL; 114 SystemProperty *Arguments::_java_library_path = NULL; 115 SystemProperty *Arguments::_java_home = NULL; 116 SystemProperty *Arguments::_java_class_path = NULL; 117 SystemProperty *Arguments::_jdk_boot_class_path_append = NULL; 118 119 GrowableArray<ModulePatchPath*> *Arguments::_patch_mod_prefix = NULL; 120 PathString *Arguments::_system_boot_class_path = NULL; 121 bool Arguments::_has_jimage = false; 122 2761 add_init_agent(name, options, is_absolute_path); 2762 } 2763 // -javaagent 2764 } else if (match_option(option, "-javaagent:", &tail)) { 2765 #if !INCLUDE_JVMTI 2766 jio_fprintf(defaultStream::error_stream(), 2767 "Instrumentation agents are not supported in this VM\n"); 2768 return JNI_ERR; 2769 #else 2770 if (tail != NULL) { 2771 size_t length = strlen(tail) + 1; 2772 char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments); 2773 jio_snprintf(options, length, "%s", tail); 2774 add_instrument_agent("instrument", options, false); 2775 // java agents need module java.instrument 2776 if (!create_numbered_property("jdk.module.addmods", "java.instrument", addmods_count++)) { 2777 return JNI_ENOMEM; 2778 } 2779 } 2780 #endif // !INCLUDE_JVMTI 2781 // --enable_preview 2782 } else if (match_option(option, "--enable-preview")) { 2783 set_enable_preview(); 2784 // -Xnoclassgc 2785 } else if (match_option(option, "-Xnoclassgc")) { 2786 if (FLAG_SET_CMDLINE(bool, ClassUnloading, false) != Flag::SUCCESS) { 2787 return JNI_EINVAL; 2788 } 2789 // -Xconcgc 2790 } else if (match_option(option, "-Xconcgc")) { 2791 if (FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, true) != Flag::SUCCESS) { 2792 return JNI_EINVAL; 2793 } 2794 handle_extra_cms_flags("-Xconcgc uses UseConcMarkSweepGC"); 2795 // -Xnoconcgc 2796 } else if (match_option(option, "-Xnoconcgc")) { 2797 if (FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, false) != Flag::SUCCESS) { 2798 return JNI_EINVAL; 2799 } 2800 handle_extra_cms_flags("-Xnoconcgc uses UseConcMarkSweepGC"); 2801 // -Xbatch 2802 } else if (match_option(option, "-Xbatch")) { 2803 if (FLAG_SET_CMDLINE(bool, BackgroundCompilation, false) != Flag::SUCCESS) { |