changeset 22728:4995b94aaed6

added HotSpotJVMCIRuntimeProvider.collectCounters and made CompilerToVM.collectCounters package-private
author Doug Simon <doug.simon@oracle.com>
date Tue, 29 Sep 2015 21:37:35 +0200
parents 8a4697106708
children bf7441345362
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/debug/BenchmarkCounters.java mx.graal/suite.py
diffstat 3 files changed, 11 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java	Tue Sep 29 18:54:18 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java	Tue Sep 29 21:37:35 2015 +0200
@@ -29,7 +29,6 @@
 import static com.oracle.graal.debug.GraalDebugConfig.MethodFilter;
 import static com.oracle.graal.debug.GraalDebugConfig.Verify;
 import static com.oracle.graal.debug.GraalDebugConfig.areScopedMetricsOrTimersEnabled;
-import static jdk.internal.jvmci.hotspot.CompilerToVM.compilerToVM;
 import static jdk.internal.jvmci.hotspot.HotSpotJVMCIRuntime.runtime;
 import static jdk.internal.jvmci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayIndexScale;
 import static jdk.internal.jvmci.inittimer.InitTimer.timer;
@@ -170,7 +169,7 @@
             }
         }
 
-        BenchmarkCounters.initialize(jvmciRuntime.getCompilerToVM());
+        BenchmarkCounters.initialize(jvmciRuntime);
 
         assert checkArrayIndexScaleInvariants();
 
@@ -255,6 +254,6 @@
         phaseTransition("final");
 
         SnippetCounter.printGroups(TTY.out().out());
-        BenchmarkCounters.shutdown(compilerToVM(), runtimeStartTime);
+        BenchmarkCounters.shutdown(runtime(), runtimeStartTime);
     }
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/debug/BenchmarkCounters.java	Tue Sep 29 18:54:18 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/debug/BenchmarkCounters.java	Tue Sep 29 21:37:35 2015 +0200
@@ -36,7 +36,7 @@
 import java.util.concurrent.atomic.AtomicLong;
 
 import jdk.internal.jvmci.common.JVMCIError;
-import jdk.internal.jvmci.hotspot.CompilerToVM;
+import jdk.internal.jvmci.hotspot.HotSpotJVMCIRuntime;
 import jdk.internal.jvmci.hotspot.HotSpotVMConfig;
 import jdk.internal.jvmci.inittimer.SuppressFBWarnings;
 import jdk.internal.jvmci.options.Option;
@@ -331,7 +331,7 @@
         }
     }
 
-    public static void initialize(final CompilerToVM compilerToVM) {
+    public static void initialize(final HotSpotJVMCIRuntime jvmciRuntime) {
         final class BenchmarkCountersOutputStream extends CallbackOutputStream {
 
             private long startTime;
@@ -347,7 +347,7 @@
                 switch (index) {
                     case 2:
                         startTime = System.nanoTime();
-                        BenchmarkCounters.clear(compilerToVM.collectCounters());
+                        BenchmarkCounters.clear(jvmciRuntime.collectCounters());
                         running = true;
                         break;
                     case 1:
@@ -359,7 +359,7 @@
                         if (waitingForEnd) {
                             waitingForEnd = false;
                             running = false;
-                            BenchmarkCounters.dump(delegate, (System.nanoTime() - startTime) / 1000000000d, compilerToVM.collectCounters(), 100);
+                            BenchmarkCounters.dump(delegate, (System.nanoTime() - startTime) / 1000000000d, jvmciRuntime.collectCounters(), 100);
                         }
                         break;
                 }
@@ -398,7 +398,7 @@
                         } catch (InterruptedException e) {
                         }
                         long time = System.nanoTime();
-                        dump(out, (time - lastTime) / 1000000000d, compilerToVM.collectCounters(), 10);
+                        dump(out, (time - lastTime) / 1000000000d, jvmciRuntime.collectCounters(), 10);
                         lastTime = time;
                     }
                 }
@@ -409,13 +409,13 @@
             enabled = true;
         }
         if (enabled) {
-            clear(compilerToVM.collectCounters());
+            clear(jvmciRuntime.collectCounters());
         }
     }
 
-    public static void shutdown(CompilerToVM compilerToVM, long compilerStartTime) {
+    public static void shutdown(HotSpotJVMCIRuntime jvmciRuntime, long compilerStartTime) {
         if (Options.GenericDynamicCounters.getValue()) {
-            dump(TTY.out, (System.nanoTime() - compilerStartTime) / 1000000000d, compilerToVM.collectCounters(), 100);
+            dump(TTY.out, (System.nanoTime() - compilerStartTime) / 1000000000d, jvmciRuntime.collectCounters(), 100);
         }
     }
 }
--- a/mx.graal/suite.py	Tue Sep 29 18:54:18 2015 +0200
+++ b/mx.graal/suite.py	Tue Sep 29 21:37:35 2015 +0200
@@ -6,7 +6,7 @@
     "suites": [
             {
                "name" : "jvmci",
-               "version" : "b44f7dd5c7739e34fb6b9ccc837fc2d63c70ac69",
+               "version" : "02d95720c45505372fa95555f91c6acfef3e44dc",
                "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"},