changeset 21558:d563baeca9df

changed uses of Graal terminology to JVMCI (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Wed, 27 May 2015 13:43:27 +0200
parents 31fc2fce38f3
children be896a1983c0
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.jvmci.debug/overview.html graal/com.oracle.jvmci.debug/src/com/oracle/jvmci/debug/Debug.java graal/com.oracle.jvmci.debug/src/com/oracle/jvmci/debug/Fingerprint.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/CompilerToVM.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/CompilerToVMImpl.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCodeCacheProvider.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCompiledNmethod.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotJVMCIRuntime.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotJVMCIRuntimeProvider.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotOptions.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/InitTimer.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/Stable.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/logging/CountingProxy.java graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/logging/Logger.java graal/com.oracle.jvmci.hotspotvmconfig.processor/src/com/oracle/jvmci/hotspotvmconfig/processor/HotSpotVMConfigProcessor.java graal/com.oracle.jvmci.options.processor/src/com/oracle/jvmci/options/processor/OptionProcessor.java graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionType.java graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionValue.java graal/com.oracle.jvmci.runtime/src/com/oracle/jvmci/runtime/Services.java
diffstat 20 files changed, 41 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Wed May 27 13:43:27 2015 +0200
@@ -358,11 +358,11 @@
      *
      * @param metaspaceMethod
      * @param entryBCI
-     * @param graalEnv address of native GraalEnv object
+     * @param jvmciEnv address of native GraalEnv object
      * @param id CompileTask::_compile_id
      */
     @SuppressWarnings("unused")
-    private static void compileMetaspaceMethod(long metaspaceMethod, int entryBCI, long graalEnv, int id) {
+    private static void compileMetaspaceMethod(long metaspaceMethod, int entryBCI, long jvmciEnv, int id) {
         // Ensure a Graal runtime is initialized prior to Debug being initialized as the former
         // may include processing command line options used by the latter.
         Graal.getRuntime();
@@ -373,7 +373,7 @@
         }
 
         HotSpotResolvedJavaMethod method = HotSpotResolvedJavaMethodImpl.fromMetaspace(metaspaceMethod);
-        compileMethod(method, entryBCI, graalEnv, id);
+        compileMethod(method, entryBCI, jvmciEnv, id);
     }
 
     /**
--- a/graal/com.oracle.jvmci.debug/overview.html	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.debug/overview.html	Wed May 27 13:43:27 2015 +0200
@@ -30,7 +30,7 @@
 </head>
 <body>
 
-Documentation for the <code>com.oracle.graal.debug</code> project.
+Documentation for the <code>com.oracle.jvmci.debug</code> project.
 
 </body>
 </html>
--- a/graal/com.oracle.jvmci.debug/src/com/oracle/jvmci/debug/Debug.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.debug/src/com/oracle/jvmci/debug/Debug.java	Wed May 27 13:43:27 2015 +0200
@@ -45,7 +45,7 @@
      */
     public static class Initialization {
 
-        public static final String INITIALIZER_PROPERTY_NAME = "graal.debug.enable";
+        public static final String INITIALIZER_PROPERTY_NAME = "jvmci.debug.enable";
 
         private static boolean initialized;
 
@@ -1305,19 +1305,19 @@
         }
     };
 
-    public static final String ENABLE_UNSCOPED_TIMERS_PROPERTY_NAME = "graal.debug.unscopedTimers";
-    public static final String ENABLE_UNSCOPED_METRICS_PROPERTY_NAME = "graal.debug.unscopedMetrics";
-    public static final String ENABLE_UNSCOPED_MEM_USE_TRACKERS_PROPERTY_NAME = "graal.debug.unscopedMemUseTrackers";
+    public static final String ENABLE_UNSCOPED_TIMERS_PROPERTY_NAME = "jvmci.debug.unscopedTimers";
+    public static final String ENABLE_UNSCOPED_METRICS_PROPERTY_NAME = "jvmci.debug.unscopedMetrics";
+    public static final String ENABLE_UNSCOPED_MEM_USE_TRACKERS_PROPERTY_NAME = "jvmci.debug.unscopedMemUseTrackers";
 
     /**
      * @see #timer(CharSequence)
      */
-    public static final String ENABLE_TIMER_PROPERTY_NAME_PREFIX = "graal.debug.timer.";
+    public static final String ENABLE_TIMER_PROPERTY_NAME_PREFIX = "jvmci.debug.timer.";
 
     /**
      * @see #metric(CharSequence)
      */
-    public static final String ENABLE_METRIC_PROPERTY_NAME_PREFIX = "graal.debug.metric.";
+    public static final String ENABLE_METRIC_PROPERTY_NAME_PREFIX = "jvmci.debug.metric.";
 
     /**
      * Set of unconditionally enabled metrics. Possible values and their meanings:
--- a/graal/com.oracle.jvmci.debug/src/com/oracle/jvmci/debug/Fingerprint.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.debug/src/com/oracle/jvmci/debug/Fingerprint.java	Wed May 27 13:43:27 2015 +0200
@@ -30,7 +30,7 @@
  */
 public class Fingerprint implements AutoCloseable {
 
-    public static final String ENABLED_PROPERTY_NAME = "graal.fingerprint";
+    public static final String ENABLED_PROPERTY_NAME = "jvmci.fingerprint";
 
     /**
      * Determines whether fingerprinting is enabled. This is set by the
@@ -121,7 +121,7 @@
         return index == -1 ? events.size() : index;
     }
 
-    private static final int MAX_EVENT_TAIL_IN_ERROR_MESSAGE = Integer.getInteger("graal.fingerprint.errorEventTailLength", 50);
+    private static final int MAX_EVENT_TAIL_IN_ERROR_MESSAGE = Integer.getInteger("jvmci.fingerprint.errorEventTailLength", 50);
 
     private String tail() {
         int start = Math.max(index - MAX_EVENT_TAIL_IN_ERROR_MESSAGE, 0);
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/CompilerToVM.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/CompilerToVM.java	Wed May 27 13:43:27 2015 +0200
@@ -269,7 +269,7 @@
     void invalidateInstalledCode(InstalledCode hotspotInstalledCode);
 
     /**
-     * Collects the current values of all Graal benchmark counters, summed up over all threads.
+     * Collects the current values of all JVMCI benchmark counters, summed up over all threads.
      */
     long[] collectCounters();
 
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/CompilerToVMImpl.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/CompilerToVMImpl.java	Wed May 27 13:43:27 2015 +0200
@@ -27,14 +27,13 @@
 
 import com.oracle.jvmci.code.*;
 
-
 /**
  * Entries into the HotSpot VM from Java code.
  */
 public class CompilerToVMImpl implements CompilerToVM {
 
     /**
-     * Initializes the native part of the Graal runtime.
+     * Initializes the native part of the JVMCI runtime.
      */
     private static native void init();
 
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCodeCacheProvider.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCodeCacheProvider.java	Wed May 27 13:43:27 2015 +0200
@@ -201,12 +201,12 @@
         return installedCode;
     }
 
-    public InstalledCode installMethod(HotSpotResolvedJavaMethod method, CompilationResult compResult, long graalEnv, boolean isDefault) {
+    public InstalledCode installMethod(HotSpotResolvedJavaMethod method, CompilationResult compResult, long jvmciEnv, boolean isDefault) {
         if (compResult.getId() == -1) {
             compResult.setId(method.allocateCompileId(compResult.getEntryBCI()));
         }
         HotSpotInstalledCode installedCode = new HotSpotNmethod(method, compResult.getName(), isDefault);
-        runtime.getCompilerToVM().installCode(new HotSpotCompiledNmethod(method, compResult, graalEnv), installedCode, method.getSpeculationLog());
+        runtime.getCompilerToVM().installCode(new HotSpotCompiledNmethod(method, compResult, jvmciEnv), installedCode, method.getSpeculationLog());
         return logOrDump(installedCode, compResult);
     }
 
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCompiledNmethod.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCompiledNmethod.java	Wed May 27 13:43:27 2015 +0200
@@ -34,7 +34,7 @@
     public final HotSpotResolvedJavaMethod method;
     public final int entryBCI;
     public final int id;
-    public final long graalEnv;
+    public final long jvmciEnv;
 
     /**
      * May be set by VM if code installation fails. It will describe in more detail why installation
@@ -46,12 +46,12 @@
         this(method, compResult, 0L);
     }
 
-    public HotSpotCompiledNmethod(HotSpotResolvedJavaMethod method, CompilationResult compResult, long graalEnv) {
+    public HotSpotCompiledNmethod(HotSpotResolvedJavaMethod method, CompilationResult compResult, long jvmciEnv) {
         super(compResult);
         this.method = method;
         this.entryBCI = compResult.getEntryBCI();
         this.id = compResult.getId();
-        this.graalEnv = graalEnv;
+        this.jvmciEnv = jvmciEnv;
     }
 
     @Override
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotJVMCIRuntime.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotJVMCIRuntime.java	Wed May 27 13:43:27 2015 +0200
@@ -182,11 +182,11 @@
     private final JVMCIBackend hostBackend;
 
     /**
-     * Graal mirrors are stored as a {@link ClassValue} associated with the {@link Class} of the
+     * JVMCI mirrors are stored as a {@link ClassValue} associated with the {@link Class} of the
      * type. This data structure stores both {@link HotSpotResolvedObjectType} and
      * {@link HotSpotResolvedPrimitiveType} types.
      */
-    private final ClassValue<ResolvedJavaType> graalMirrors = new ClassValue<ResolvedJavaType>() {
+    private final ClassValue<ResolvedJavaType> jvmciMirrors = new ClassValue<ResolvedJavaType>() {
         @Override
         protected ResolvedJavaType computeValue(Class<?> javaClass) {
             if (javaClass.isPrimitive()) {
@@ -207,7 +207,7 @@
             config = new HotSpotVMConfig(compilerToVm);
         }
 
-        if (Boolean.valueOf(System.getProperty("graal.printconfig"))) {
+        if (Boolean.valueOf(System.getProperty("jvmci.printconfig"))) {
             printConfig(config);
         }
 
@@ -230,7 +230,7 @@
     }
 
     public ResolvedJavaType fromClass(Class<?> javaClass) {
-        return graalMirrors.get(javaClass);
+        return jvmciMirrors.get(javaClass);
     }
 
     private static void printConfig(HotSpotVMConfig config) {
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotJVMCIRuntimeProvider.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotJVMCIRuntimeProvider.java	Wed May 27 13:43:27 2015 +0200
@@ -31,7 +31,7 @@
 //JaCoCo Exclude
 
 /**
- * Configuration information for the HotSpot Graal runtime.
+ * Configuration information for the HotSpot JVMCI runtime.
  */
 public interface HotSpotJVMCIRuntimeProvider extends JVMCIRuntime {
 
@@ -55,7 +55,7 @@
     JavaType lookupType(String name, HotSpotResolvedObjectType accessingType, boolean resolve);
 
     /**
-     * Gets the Graal mirror for a {@link Class} object.
+     * Gets the JVMCI mirror for a {@link Class} object.
      *
      * @return the {@link ResolvedJavaType} corresponding to {@code javaClass}
      */
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotOptions.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotOptions.java	Wed May 27 13:43:27 2015 +0200
@@ -33,12 +33,12 @@
 //JaCoCo Exclude
 
 /**
- * Sets Graal options from the HotSpot command line. Such options are distinguished by the
- * {@link #GRAAL_OPTION_PREFIX} prefix.
+ * Sets JVMCI options from the HotSpot command line. Such options are distinguished by the
+ * {@link #JVMCI_OPTION_PREFIX} prefix.
  */
 public class HotSpotOptions {
 
-    private static final String GRAAL_OPTION_PREFIX = "-G:";
+    private static final String JVMCI_OPTION_PREFIX = "-G:";
 
     /**
      * Parses the JVMCI specific options specified to HotSpot (e.g., on the command line).
@@ -81,10 +81,10 @@
                 option.setValue(Boolean.FALSE);
                 break;
             case '?':
-                OptionUtils.printFlags(options, GRAAL_OPTION_PREFIX);
+                OptionUtils.printFlags(options, JVMCI_OPTION_PREFIX);
                 break;
             case ' ':
-                OptionUtils.printNoMatchMessage(options, name, GRAAL_OPTION_PREFIX);
+                OptionUtils.printNoMatchMessage(options, name, JVMCI_OPTION_PREFIX);
                 break;
             case 'i':
                 option.setValue((int) primitiveValue);
@@ -110,6 +110,6 @@
      *            instead.
      */
     public static boolean parseOption(String option, OptionConsumer setter) {
-        return OptionUtils.parseOption(options, option, GRAAL_OPTION_PREFIX, setter);
+        return OptionUtils.parseOption(options, option, JVMCI_OPTION_PREFIX, setter);
     }
 }
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/InitTimer.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/InitTimer.java	Wed May 27 13:43:27 2015 +0200
@@ -28,7 +28,7 @@
 
 /**
  * A facility for timing a step in the runtime initialization sequence. This exists separate from
- * {@link DebugTimer} as it must be independent from all other Graal code so as to not perturb the
+ * {@link DebugTimer} as it must be independent from all other JVMCI code so as to not perturb the
  * initialization sequence.
  */
 public final class InitTimer implements AutoCloseable {
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/Stable.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/Stable.java	Wed May 27 13:43:27 2015 +0200
@@ -26,10 +26,9 @@
 import java.lang.annotation.*;
 
 /**
- * This annotation functions as an alias for the sun.invoke.Stable annotation within Graal code. It
+ * This annotation functions as an alias for the sun.invoke.Stable annotation within JVMCI code. It
  * is specially recognized during class file parsing in the same way as that annotation.
  */
-
 @Target(ElementType.FIELD)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Stable {
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/logging/CountingProxy.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/logging/CountingProxy.java	Wed May 27 13:43:27 2015 +0200
@@ -29,14 +29,13 @@
 
 import com.oracle.jvmci.debug.*;
 
-
 /**
  * A java.lang.reflect proxy that hierarchically logs all method invocations along with their
  * parameters and return values.
  */
 public class CountingProxy<T> implements InvocationHandler {
 
-    public static final boolean ENABLED = Boolean.valueOf(System.getProperty("graal.countcalls"));
+    public static final boolean ENABLED = Boolean.valueOf(System.getProperty("jvmci.countcalls"));
 
     private T delegate;
 
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/logging/Logger.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/logging/Logger.java	Wed May 27 13:43:27 2015 +0200
@@ -34,7 +34,7 @@
  */
 public class Logger {
 
-    public static final boolean ENABLED = Boolean.valueOf(System.getProperty("graal.debug"));
+    public static final boolean ENABLED = Boolean.valueOf(System.getProperty("jvmci.debug"));
     private static final int SPACING = 4;
     private static final ThreadLocal<Logger> loggerTL;
 
@@ -58,7 +58,7 @@
         }
 
         PrintStream ps = null;
-        String filename = System.getProperty("graal.info_file");
+        String filename = System.getProperty("jvmci.info_file");
         if (filename != null && !"".equals(filename)) {
             try {
                 ps = new PrintStream(new FileOutputStream(filename));
--- a/graal/com.oracle.jvmci.hotspotvmconfig.processor/src/com/oracle/jvmci/hotspotvmconfig/processor/HotSpotVMConfigProcessor.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspotvmconfig.processor/src/com/oracle/jvmci/hotspotvmconfig/processor/HotSpotVMConfigProcessor.java	Wed May 27 13:43:27 2015 +0200
@@ -230,7 +230,7 @@
 
     protected PrintWriter createSourceFile(String pkg, String relativeName, Filer filer, Element... originatingElements) {
         try {
-            // Ensure Unix line endings to comply with Graal code style guide checked by Checkstyle
+            // Ensure Unix line endings to comply with code style guide checked by Checkstyle
             FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, pkg, relativeName, originatingElements);
             logMessage("%s\n", sourceFile);
             return new PrintWriter(sourceFile.openWriter()) {
--- a/graal/com.oracle.jvmci.options.processor/src/com/oracle/jvmci/options/processor/OptionProcessor.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.options.processor/src/com/oracle/jvmci/options/processor/OptionProcessor.java	Wed May 27 13:43:27 2015 +0200
@@ -35,7 +35,6 @@
 
 import com.oracle.jvmci.options.*;
 
-
 /**
  * Processes static fields annotated with {@link Option}. An {@link Options} service is generated
  * for each top level class containing at least one such field. These service objects can be
@@ -227,7 +226,7 @@
 
     protected PrintWriter createSourceFile(String pkg, String relativeName, Filer filer, Element... originatingElements) {
         try {
-            // Ensure Unix line endings to comply with Graal code style guide checked by Checkstyle
+            // Ensure Unix line endings to comply with code style guide checked by Checkstyle
             JavaFileObject sourceFile = filer.createSourceFile(pkg + "." + relativeName, originatingElements);
             return new PrintWriter(sourceFile.openWriter()) {
 
--- a/graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionType.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionType.java	Wed May 27 13:43:27 2015 +0200
@@ -23,7 +23,7 @@
 package com.oracle.jvmci.options;
 
 /**
- * Classifies Graal options in several categories depending on who this option is relevant for.
+ * Classifies JVMCI options in several categories depending on who this option is relevant for.
  *
  */
 public enum OptionType {
--- a/graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionValue.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.options/src/com/oracle/jvmci/options/OptionValue.java	Wed May 27 13:43:27 2015 +0200
@@ -151,7 +151,7 @@
     private OptionValue<?> next;
     private static OptionValue<?> head;
 
-    private static final boolean ShowReadsHistogram = Boolean.getBoolean("graal.showOptionValueReadsHistogram");
+    private static final boolean ShowReadsHistogram = Boolean.getBoolean("jvmci.showOptionValueReadsHistogram");
 
     private static void addToHistogram(OptionValue<?> option) {
         if (ShowReadsHistogram) {
--- a/graal/com.oracle.jvmci.runtime/src/com/oracle/jvmci/runtime/Services.java	Wed May 27 13:32:18 2015 +0200
+++ b/graal/com.oracle.jvmci.runtime/src/com/oracle/jvmci/runtime/Services.java	Wed May 27 13:43:27 2015 +0200
@@ -39,7 +39,7 @@
             Service[] names = getServiceImpls(type);
             if (names == null || names.length == 0) {
                 throw new InternalError(
-                                format("No implementations for %s found (ensure %s extends %s and that in suite.py the \"annotationProcessors\" attribute for the project enclosing %s includes \"com.oracle.graal.service.processor\")",
+                                format("No implementations for %s found (ensure %s extends %s and that in suite.py the \"annotationProcessors\" attribute for the project enclosing %s includes \"com.oracle.jvmci.runtime.processor\")",
                                                 type.getSimpleName(), type.getSimpleName(), Service.class, type.getSimpleName()));
             }
             return Arrays.asList(names);