changeset 22501:d113a94d4fdd

Call JVMCIRuntime::parse_properties in Threads::create_vm
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Mon, 31 Aug 2015 18:17:07 +0200
parents 148664eacffa
children e2e9c39b7818
files src/share/vm/jvmci/jvmciRuntime.cpp src/share/vm/runtime/arguments.cpp src/share/vm/runtime/thread.cpp
diffstat 3 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciRuntime.cpp	Mon Aug 31 17:37:55 2015 +0200
+++ b/src/share/vm/jvmci/jvmciRuntime.cpp	Mon Aug 31 18:17:07 2015 +0200
@@ -835,7 +835,9 @@
     *sep = '\0';
     const char* name = line;
     char* value = sep + 1;
-    Arguments::PropertyList_add(_plist, name, value);
+    if(Arguments::PropertyList_get_value(*_plist, name) == NULL) {
+      Arguments::PropertyList_add(_plist, name, value);
+    }
   }
 };
 
@@ -960,11 +962,7 @@
     if (file_handle != -1) {
       char* buffer = NEW_C_HEAP_ARRAY(char, st.st_size + 1, mtInternal);
       int num_read;
-      if(ThreadLocalStorage::thread() == NULL) { // Solaris needs a JavaThread for os::read, if no thread started yet, fallback.
-        num_read = (int) ::read(file_handle, (char*) buffer, st.st_size);
-      } else {
-        num_read = (int) os::read(file_handle, (char*) buffer, st.st_size);
-      }
+      num_read = (int) os::read(file_handle, (char*) buffer, st.st_size);
       if (num_read == -1) {
         warning("Error reading file %s due to %s", path, strerror(errno));
       } else if (num_read != st.st_size) {
--- a/src/share/vm/runtime/arguments.cpp	Mon Aug 31 17:37:55 2015 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Mon Aug 31 18:17:07 2015 +0200
@@ -212,10 +212,6 @@
 
   // Set OS specific system properties values
   os::init_system_properties_values();
-
-#if INCLUDE_JVMCI
-  JVMCIRuntime::parse_properties(&_system_properties);
-#endif
 }
 
 
--- a/src/share/vm/runtime/thread.cpp	Mon Aug 31 17:37:55 2015 +0200
+++ b/src/share/vm/runtime/thread.cpp	Mon Aug 31 18:17:07 2015 +0200
@@ -3703,11 +3703,13 @@
   }
 
 #if INCLUDE_JVMCI
-  const char* jvmciCompiler = Arguments::PropertyList_get_value(Arguments::system_properties(), "jvmci.compiler");
+  SystemProperty *properties = Arguments::system_properties();
+  JVMCIRuntime::parse_properties(&properties);
+  const char* jvmciCompiler = Arguments::PropertyList_get_value(properties, "jvmci.compiler");
   if (jvmciCompiler != NULL) {
     JVMCIRuntime::save_compiler(jvmciCompiler);
   }
-  const char* jvmciOptions = Arguments::PropertyList_get_value(Arguments::system_properties(), "jvmci.options");
+  const char* jvmciOptions = Arguments::PropertyList_get_value(properties, "jvmci.options");
   if (jvmciOptions != NULL) {
     JVMCIRuntime::save_options(jvmciOptions);
   }