--- a/src/hotspot/share/runtime/arguments.cpp Thu Jun 14 07:26:27 2018 +0200
+++ b/src/hotspot/share/runtime/arguments.cpp Thu Jun 14 02:01:31 2018 -0400
@@ -116,6 +116,7 @@
SystemProperty *Arguments::_java_home = NULL;
SystemProperty *Arguments::_java_class_path = NULL;
SystemProperty *Arguments::_jdk_boot_class_path_append = NULL;
+SystemProperty *Arguments::_vm_info = NULL;
GrowableArray<ModulePatchPath*> *Arguments::_patch_mod_prefix = NULL;
PathString *Arguments::_system_boot_class_path = NULL;
@@ -395,9 +396,11 @@
"Java Virtual Machine Specification", false));
PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(), false));
PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(), false));
- PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true));
PropertyList_add(&_system_properties, new SystemProperty("jdk.debug", VM_Version::jdk_debug_level(), false));
+ // Initialize the vm.info now, but it will need updating after argument parsing.
+ _vm_info = new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true);
+
// Following are JVMTI agent writable properties.
// Properties values are set to NULL and they are
// os specific they are initialized in os::init_system_properties_values().
@@ -417,6 +420,7 @@
PropertyList_add(&_system_properties, _java_home);
PropertyList_add(&_system_properties, _java_class_path);
PropertyList_add(&_system_properties, _jdk_boot_class_path_append);
+ PropertyList_add(&_system_properties, _vm_info);
// Set OS specific system properties values
os::init_system_properties_values();
@@ -4451,18 +4455,6 @@
PropertyList_add(plist, k, v, writeable == WriteableProperty, internal == InternalProperty);
}
-// Update existing property with new value.
-void Arguments::PropertyList_update_value(SystemProperty* plist, const char* k, const char* v) {
- SystemProperty* prop;
- for (prop = plist; prop != NULL; prop = prop->next()) {
- if (strcmp(k, prop->key()) == 0) {
- prop->set_value(v);
- return;
- }
- }
- assert(false, "invalid property");
-}
-
// Copies src into buf, replacing "%%" with "%" and "%p" with pid
// Returns true if all of the source pointed by src has been copied over to
// the destination buffer pointed by buf. Otherwise, returns false.