< prev index next >

src/share/vm/runtime/arguments.hpp

Print this page

        

*** 41,51 **** typedef jint (JNICALL *vfprintf_hook_t)(FILE *fp, const char *format, va_list args) ATTRIBUTE_PRINTF(2, 0); } // PathString is used as: // - the underlying value for a SystemProperty ! // - the path portion of an -Xpatch module/path pair // - the string that represents the system boot class path, Arguments::_system_boot_class_path. class PathString : public CHeapObj<mtArguments> { protected: char* _value; public: --- 41,51 ---- typedef jint (JNICALL *vfprintf_hook_t)(FILE *fp, const char *format, va_list args) ATTRIBUTE_PRINTF(2, 0); } // PathString is used as: // - the underlying value for a SystemProperty ! // - the path portion of an --patch-module module/path pair // - the string that represents the system boot class path, Arguments::_system_boot_class_path. class PathString : public CHeapObj<mtArguments> { protected: char* _value; public:
*** 105,129 **** _value = NULL; } } }; ! // ModuleXPatchPath records the module/path pair as specified to -Xpatch. ! class ModuleXPatchPath : public CHeapObj<mtInternal> { private: char* _module_name; PathString* _path; public: ! ModuleXPatchPath(const char* module_name, const char* path) { assert(module_name != NULL && path != NULL, "Invalid module name or path value"); size_t len = strlen(module_name) + 1; _module_name = AllocateHeap(len, mtInternal); strncpy(_module_name, module_name, len); // copy the trailing null _path = new PathString(path); } ! ~ModuleXPatchPath() { if (_module_name != NULL) { FreeHeap(_module_name); _module_name = NULL; } if (_path != NULL) { --- 105,129 ---- _value = NULL; } } }; ! // ModulePatchPath records the module/path pair as specified to --patch-module. ! class ModulePatchPath : public CHeapObj<mtInternal> { private: char* _module_name; PathString* _path; public: ! ModulePatchPath(const char* module_name, const char* path) { assert(module_name != NULL && path != NULL, "Invalid module name or path value"); size_t len = strlen(module_name) + 1; _module_name = AllocateHeap(len, mtInternal); strncpy(_module_name, module_name, len); // copy the trailing null _path = new PathString(path); } ! ~ModulePatchPath() { if (_module_name != NULL) { FreeHeap(_module_name); _module_name = NULL; } if (_path != NULL) {
*** 323,332 **** --- 323,347 ---- arg_too_small = -2, arg_too_big = -1, arg_in_range = 0 }; + enum PropertyAppendable { + AppendProperty, + AddProperty + }; + + enum PropertyWriteable { + WriteableProperty, + UnwriteableProperty + }; + + enum PropertyInternal { + InternalProperty, + ExternalProperty + }; + private: // a pointer to the flags file name if it is specified static char* _jvm_flags_file; // an array containing all flags specified in the .hotspotrc file
*** 346,367 **** static SystemProperty *_java_library_path; static SystemProperty *_java_home; static SystemProperty *_java_class_path; static SystemProperty *_jdk_boot_class_path_append; ! // -Xpatch:module=<file>(<pathsep><file>)* // Each element contains the associated module name, path ! // string pair as specified to -Xpatch. ! static GrowableArray<ModuleXPatchPath*>* _xpatchprefix; // The constructed value of the system class path after // argument processing and JVMTI OnLoad additions via // calls to AddToBootstrapClassLoaderSearch. This is the // final form before ClassLoader::setup_bootstrap_search(). ! // Note: since -Xpatch is a module name/path pair, the system ! // boot class path string no longer contains the "prefix" to ! // the boot class path base piece as it did when // -Xbootclasspath/p was supported. static PathString *_system_boot_class_path; // temporary: to emit warning if the default ext dirs are not empty. // remove this variable when the warning is no longer needed. --- 361,382 ---- static SystemProperty *_java_library_path; static SystemProperty *_java_home; static SystemProperty *_java_class_path; static SystemProperty *_jdk_boot_class_path_append; ! // --patch-module=module=<file>(<pathsep><file>)* // Each element contains the associated module name, path ! // string pair as specified to --patch-module. ! static GrowableArray<ModulePatchPath*>* _patch_mod_prefix; // The constructed value of the system class path after // argument processing and JVMTI OnLoad additions via // calls to AddToBootstrapClassLoaderSearch. This is the // final form before ClassLoader::setup_bootstrap_search(). ! // Note: since --patch-module is a module name/path pair, the ! // system boot class path string no longer contains the "prefix" ! // to the boot class path base piece as it did when // -Xbootclasspath/p was supported. static PathString *_system_boot_class_path; // temporary: to emit warning if the default ext dirs are not empty. // remove this variable when the warning is no longer needed.
*** 462,472 **** static abort_hook_t _abort_hook; static exit_hook_t _exit_hook; static vfprintf_hook_t _vfprintf_hook; // System properties ! static bool add_property(const char* prop); // Miscellaneous system property setter static bool append_to_addmods_property(const char* module_name); // Aggressive optimization flags. --- 477,493 ---- static abort_hook_t _abort_hook; static exit_hook_t _exit_hook; static vfprintf_hook_t _vfprintf_hook; // System properties ! static bool add_property(const char* prop, PropertyWriteable writeable=WriteableProperty, ! PropertyInternal internal=ExternalProperty); ! ! static bool create_property(const char* prop_name, const char* prop_value, PropertyInternal internal); ! static bool create_numbered_property(const char* prop_base_name, const char* prop_value, unsigned int count); ! ! static int process_patch_mod_option(const char* patch_mod_tail, bool* patch_mod_javabase); // Miscellaneous system property setter static bool append_to_addmods_property(const char* module_name); // Aggressive optimization flags.
*** 500,510 **** static bool handle_deprecated_print_gc_flags(); static jint parse_vm_init_args(const JavaVMInitArgs *java_tool_options_args, const JavaVMInitArgs *java_options_args, const JavaVMInitArgs *cmd_line_args); ! static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* xpatch_javabase, Flag::Flags origin); static jint finalize_vm_init_args(); static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type); static bool is_bad_option(const JavaVMOption* option, jboolean ignore) { return is_bad_option(option, ignore, NULL); --- 521,531 ---- static bool handle_deprecated_print_gc_flags(); static jint parse_vm_init_args(const JavaVMInitArgs *java_tool_options_args, const JavaVMInitArgs *java_options_args, const JavaVMInitArgs *cmd_line_args); ! static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_mod_javabase, Flag::Flags origin); static jint finalize_vm_init_args(); static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type); static bool is_bad_option(const JavaVMOption* option, jboolean ignore) { return is_bad_option(option, ignore, NULL);
*** 719,757 **** static void init_version_specific_system_properties(); // Property List manipulation static void PropertyList_add(SystemProperty *element); static void PropertyList_add(SystemProperty** plist, SystemProperty *element); ! static void PropertyList_add(SystemProperty** plist, const char* k, const char* v); ! static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v) { ! PropertyList_unique_add(plist, k, v, false); ! } ! static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v, jboolean append); static const char* PropertyList_get_value(SystemProperty* plist, const char* key); static int PropertyList_count(SystemProperty* pl); static const char* PropertyList_get_key_at(SystemProperty* pl,int index); static char* PropertyList_get_value_at(SystemProperty* pl,int index); // Miscellaneous System property value getter and setters. static void set_dll_dir(const char *value) { _sun_boot_library_path->set_value(value); } static void set_java_home(const char *value) { _java_home->set_value(value); } static void set_library_path(const char *value) { _java_library_path->set_value(value); } static void set_ext_dirs(char *value) { _ext_dirs = os::strdup_check_oom(value); } // Set up the underlying pieces of the system boot class path ! static void add_xpatchprefix(const char *module_name, const char *path, bool* xpatch_javabase); static void set_sysclasspath(const char *value) { _system_boot_class_path->set_value(value); set_jdkbootclasspath_append(); } static void append_sysclasspath(const char *value) { _system_boot_class_path->append_value(value); set_jdkbootclasspath_append(); } static void set_jdkbootclasspath_append(); ! static GrowableArray<ModuleXPatchPath*>* get_xpatchprefix() { return _xpatchprefix; } static char* get_sysclasspath() { return _system_boot_class_path->value(); } static char* get_jdk_boot_class_path_append() { return _jdk_boot_class_path_append->value(); } static char* get_java_home() { return _java_home->value(); } static char* get_dll_dir() { return _sun_boot_library_path->value(); } --- 740,780 ---- static void init_version_specific_system_properties(); // Property List manipulation static void PropertyList_add(SystemProperty *element); static void PropertyList_add(SystemProperty** plist, SystemProperty *element); ! static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal); ! ! static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v, ! PropertyAppendable append, PropertyWriteable writeable, ! PropertyInternal internal); static const char* PropertyList_get_value(SystemProperty* plist, const char* key); static int PropertyList_count(SystemProperty* pl); static const char* PropertyList_get_key_at(SystemProperty* pl,int index); static char* PropertyList_get_value_at(SystemProperty* pl,int index); + static bool is_internal_module_property(const char* option); + // Miscellaneous System property value getter and setters. static void set_dll_dir(const char *value) { _sun_boot_library_path->set_value(value); } static void set_java_home(const char *value) { _java_home->set_value(value); } static void set_library_path(const char *value) { _java_library_path->set_value(value); } static void set_ext_dirs(char *value) { _ext_dirs = os::strdup_check_oom(value); } // Set up the underlying pieces of the system boot class path ! static void add_patch_mod_prefix(const char *module_name, const char *path, bool* patch_mod_javabase); static void set_sysclasspath(const char *value) { _system_boot_class_path->set_value(value); set_jdkbootclasspath_append(); } static void append_sysclasspath(const char *value) { _system_boot_class_path->append_value(value); set_jdkbootclasspath_append(); } static void set_jdkbootclasspath_append(); ! static GrowableArray<ModulePatchPath*>* get_patch_mod_prefix() { return _patch_mod_prefix; } static char* get_sysclasspath() { return _system_boot_class_path->value(); } static char* get_jdk_boot_class_path_append() { return _jdk_boot_class_path_append->value(); } static char* get_java_home() { return _java_home->value(); } static char* get_dll_dir() { return _sun_boot_library_path->value(); }
< prev index next >