changeset 23779:16b5e00d9196

renamed JVMCIPrintFlags to JVMCIPrintSystemProperties
author Doug Simon <doug.simon@oracle.com>
date Wed, 05 Oct 2016 13:58:15 +0200
parents a2051f3fe76b
children 4ae76f509448
files jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java src/share/vm/compiler/compileBroker.cpp src/share/vm/jvmci/jvmci_globals.cpp src/share/vm/jvmci/jvmci_globals.hpp
diffstat 4 files changed, 18 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java	Wed Oct 05 10:19:36 2016 +0200
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java	Wed Oct 05 13:58:15 2016 +0200
@@ -92,7 +92,7 @@
         // @formatter:off
         Compiler(String.class, null, "Selects the system compiler."),
         // Note: The following one is not used (see InitTimer.ENABLED). It is added here
-        // so that -XX:JVMCIPrintFlags shows the option.
+        // so that -XX:+JVMCIPrintSystemProperties shows the option.
         InitTimer(Boolean.class, false, "Specifies if initialization timing is enabled."),
         PrintConfig(Boolean.class, false, "Prints VM configuration available via JVMCI and exits."),
         TraceMethodDataFilter(String.class, null,
@@ -128,7 +128,7 @@
         @SuppressFBWarnings(value = "ES_COMPARING_STRINGS_WITH_EQ", justification = "sentinel must be String since it's a static final in an enum")
         private Object getValue() {
             if (value == UNINITIALIZED) {
-                String propertyValue = VM.getSavedProperty(JVMCI_OPTION_PROPERTY_PREFIX + name());
+                String propertyValue = VM.getSavedProperty(getPropertyName());
                 if (propertyValue == null) {
                     this.value = defaultValue;
                     this.isDefault = true;
@@ -149,6 +149,13 @@
         }
 
         /**
+         * Gets the name of system property from which this option gets its value.
+         */
+        public String getPropertyName() {
+            return JVMCI_OPTION_PROPERTY_PREFIX + name();
+        }
+
+        /**
          * Returns the option's value as boolean.
          *
          * @return option's value
@@ -172,13 +179,13 @@
          * @param out stream to print to
          */
         public static void printFlags(PrintStream out) {
-            out.println("[List of JVMCI options. Set with \"jvmci.\" prefixed system property (e.g., -Djvmci." + InitTimer.name() + "=true)");
+            out.println("[List of JVMCI system properties]");
             int typeWidth = 0;
             int nameWidth = 0;
             Option[] values = values();
             for (Option option : values) {
                 typeWidth = Math.max(typeWidth, option.type.getSimpleName().length());
-                nameWidth = Math.max(nameWidth, option.name().length());
+                nameWidth = Math.max(nameWidth, option.getPropertyName().length());
             }
             for (Option option : values) {
                 Object value = option.getValue();
@@ -187,7 +194,7 @@
                 }
                 String assign = option.isDefault ? " =" : ":=";
                 String format = "%" + (typeWidth + 1) + "s %-" + (nameWidth + 1) + "s %s %s%n";
-                out.printf(format, option.type.getSimpleName(), option.name(), assign, value);
+                out.printf(format, option.type.getSimpleName(), option.getPropertyName(), assign, value);
                 String helpFormat = "%" + (typeWidth + 1) + "s %s%n";
                 for (String line : option.helpLines) {
                     out.printf(helpFormat, "", line);
@@ -302,7 +309,7 @@
             compilationLevelAdjustment = config.compLevelAdjustmentNone;
         }
 
-        if (config.getFlag("JVMCIPrintFlags", Boolean.class)) {
+        if (config.getFlag("JVMCIPrintSystemProperties", Boolean.class)) {
             PrintStream out = new PrintStream(getLogStream());
             Option.printFlags(out);
             compilerFactory.printFlags(out);
--- a/src/share/vm/compiler/compileBroker.cpp	Wed Oct 05 10:19:36 2016 +0200
+++ b/src/share/vm/compiler/compileBroker.cpp	Wed Oct 05 13:58:15 2016 +0200
@@ -944,8 +944,8 @@
 #if INCLUDE_JVMCI
   if (EnableJVMCI) {
     JVMCICompiler* jvmci = new JVMCICompiler();
-    if (JVMCIPrintFlags) {
-      // Initialize JVMCI eagerly if JVMCIPrintFlags is enabled.
+    if (JVMCIPrintSystemProperties) {
+      // Initialize JVMCI eagerly if JVMCIPrintSystemProperties is enabled.
       // The JVMCI Java initialization code will read this flag and
       // do the printing if it's set.
       JVMCIRuntime::ensure_jvmci_class_loader_is_initialized();
--- a/src/share/vm/jvmci/jvmci_globals.cpp	Wed Oct 05 10:19:36 2016 +0200
+++ b/src/share/vm/jvmci/jvmci_globals.cpp	Wed Oct 05 13:58:15 2016 +0200
@@ -74,7 +74,7 @@
   CHECK_NOT_SET(JVMCIUseFastLocking,          EnableJVMCI)
   CHECK_NOT_SET(JVMCINMethodSizeLimit,        EnableJVMCI)
   CHECK_NOT_SET(MethodProfileWidth,           EnableJVMCI)
-  CHECK_NOT_SET(JVMCIPrintFlags,              EnableJVMCI)
+  CHECK_NOT_SET(JVMCIPrintSystemProperties,   EnableJVMCI)
   CHECK_NOT_SET(TraceUncollectedSpeculations, EnableJVMCI)
 
 #ifndef PRODUCT
--- a/src/share/vm/jvmci/jvmci_globals.hpp	Wed Oct 05 10:19:36 2016 +0200
+++ b/src/share/vm/jvmci/jvmci_globals.hpp	Wed Oct 05 13:58:15 2016 +0200
@@ -52,8 +52,8 @@
   product(bool, UseJVMCICompiler, false,                                    \
           "Use JVMCI as the default compiler")                              \
                                                                             \
-  product(bool, JVMCIPrintFlags, false,                                     \
-          "Prints flags defined by the JVMCI compiler")                     \
+  product(bool, JVMCIPrintSystemProperties, false,                          \
+          "Prints system properties used by the JVMCI compiler")            \
                                                                             \
   product(bool, UseJVMCIClassLoader, true,                                  \
           "Load JVMCI classes with separate class loader")                  \