changeset 22727:8a4697106708

added HotSpotCodeCacheProvider.notifyCompilationStatistics and HotSpotCodeCacheProvider.resetCompilationStatistics and made made these methods package-private in CompilerToVM
author Doug Simon <doug.simon@oracle.com>
date Tue, 29 Sep 2015 18:54:18 +0200
parents e29ef4820ddc
children 4995b94aaed6
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java mx.graal/suite.py
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Tue Sep 29 18:54:12 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Tue Sep 29 18:54:18 2015 +0200
@@ -34,10 +34,10 @@
 import java.util.concurrent.TimeUnit;
 
 import jdk.internal.jvmci.code.BailoutException;
+import jdk.internal.jvmci.code.CodeCacheProvider;
 import jdk.internal.jvmci.code.CompilationResult;
 import jdk.internal.jvmci.code.InstalledCode;
 import jdk.internal.jvmci.compiler.Compiler;
-import jdk.internal.jvmci.hotspot.CompilerToVM;
 import jdk.internal.jvmci.hotspot.HotSpotCodeCacheProvider;
 import jdk.internal.jvmci.hotspot.HotSpotCompilationRequest;
 import jdk.internal.jvmci.hotspot.HotSpotInstalledCode;
@@ -279,8 +279,8 @@
             long compilationTime = System.nanoTime() - startCompilationTime;
             if ((config.ciTime || config.ciTimeEach) && installedCode != null) {
                 long timeUnitsPerSecond = TimeUnit.NANOSECONDS.convert(1, TimeUnit.SECONDS);
-                CompilerToVM c2vm = jvmciRuntime.getCompilerToVM();
-                c2vm.notifyCompilationStatistics(getId(), method, entryBCI != Compiler.INVOCATION_ENTRY_BCI, compiledBytecodes, compilationTime, timeUnitsPerSecond, installedCode);
+                final HotSpotCodeCacheProvider codeCache = (HotSpotCodeCacheProvider) jvmciRuntime.getHostJVMCIBackend().getCodeCache();
+                codeCache.notifyCompilationStatistics(getId(), method, entryBCI != Compiler.INVOCATION_ENTRY_BCI, compiledBytecodes, compilationTime, timeUnitsPerSecond, installedCode);
             }
         }
     }
@@ -307,7 +307,7 @@
 
     @SuppressWarnings("try")
     private InstalledCode installMethod(final CompilationResult compResult) {
-        final HotSpotCodeCacheProvider codeCache = (HotSpotCodeCacheProvider) jvmciRuntime.getHostJVMCIBackend().getCodeCache();
+        final CodeCacheProvider codeCache = jvmciRuntime.getHostJVMCIBackend().getCodeCache();
         InstalledCode installedCode = null;
         try (Scope s = Debug.scope("CodeInstall", new DebugDumpScope(String.valueOf(getId()), true), codeCache, getMethod())) {
             installedCode = codeCache.installCode(request, compResult, null, request.getMethod().getSpeculationLog(), installAsDefault);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java	Tue Sep 29 18:54:12 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java	Tue Sep 29 18:54:18 2015 +0200
@@ -31,7 +31,7 @@
 import jdk.internal.jvmci.code.CompilationRequest;
 import jdk.internal.jvmci.code.CompilationResult;
 import jdk.internal.jvmci.compiler.Compiler;
-import jdk.internal.jvmci.hotspot.CompilerToVM;
+import jdk.internal.jvmci.hotspot.HotSpotCodeCacheProvider;
 import jdk.internal.jvmci.hotspot.HotSpotCompilationRequest;
 import jdk.internal.jvmci.hotspot.HotSpotJVMCIRuntimeProvider;
 import jdk.internal.jvmci.meta.JavaType;
@@ -93,10 +93,10 @@
     }
 
     public void compileTheWorld() throws Throwable {
-        CompilerToVM compilerToVM = jvmciRuntime.getCompilerToVM();
+        HotSpotCodeCacheProvider codeCache = (HotSpotCodeCacheProvider) jvmciRuntime.getHostJVMCIBackend().getCodeCache();
         int iterations = CompileTheWorldOptions.CompileTheWorldIterations.getValue();
         for (int i = 0; i < iterations; i++) {
-            compilerToVM.resetCompilationStatistics();
+            codeCache.resetCompilationStatistics();
             TTY.println("CompileTheWorld : iteration " + i);
             CompileTheWorld ctw = new CompileTheWorld(jvmciRuntime, this);
             ctw.compile();
--- a/mx.graal/suite.py	Tue Sep 29 18:54:12 2015 +0200
+++ b/mx.graal/suite.py	Tue Sep 29 18:54:18 2015 +0200
@@ -6,7 +6,7 @@
     "suites": [
             {
                "name" : "jvmci",
-               "version" : "19ce432d854d972ce44fee805ca7022927a67db2",
+               "version" : "b44f7dd5c7739e34fb6b9ccc837fc2d63c70ac69",
                "urls" : [
                     {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"},
                     {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},