Mercurial > hg > truffle
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java @ 7569:7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 30 Jan 2013 22:33:04 +0100 |
parents | 0b68e6426b48 |
children | 8bbbde9d0a52 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Wed Jan 30 21:36:28 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Wed Jan 30 22:33:04 2013 +0100 @@ -56,8 +56,6 @@ private final HotSpotGraalRuntime graalRuntime; - private static final boolean BenchmarkCompilation = Boolean.getBoolean("graal.benchmark.compilation"); - public final HotSpotResolvedPrimitiveType typeBoolean; public final HotSpotResolvedPrimitiveType typeChar; public final HotSpotResolvedPrimitiveType typeFloat; @@ -76,6 +74,8 @@ private PrintStream log = System.out; + private boolean quietMeterAndTime; + public VMToCompilerImpl(HotSpotGraalRuntime compiler) { this.graalRuntime = compiler; @@ -98,7 +98,8 @@ public void startCompiler() throws Throwable { - long offset = HotSpotGraalRuntime.getInstance().getConfig().graalMirrorInClassOffset; + HotSpotVMConfig config = graalRuntime.getConfig(); + long offset = config.graalMirrorInClassOffset; initMirror(typeBoolean, offset); initMirror(typeChar, offset); initMirror(typeFloat, offset); @@ -126,11 +127,11 @@ } } - if (BenchmarkCompilation) { + if (config.ciTime) { + quietMeterAndTime = (GraalOptions.Meter == null && GraalOptions.Time == null); GraalOptions.Debug = true; GraalOptions.Meter = ""; GraalOptions.Time = ""; - GraalOptions.SummarizeDebugValues = true; } if (GraalOptions.Debug) { @@ -203,7 +204,7 @@ */ protected void phaseTransition(String phase) { CompilationStatistics.clear(phase); - if (BenchmarkCompilation) { + if (graalRuntime.getConfig().ciTime) { parsedBytecodesPerSecond = MetricRateInPhase.snapshot(phase, parsedBytecodesPerSecond, BytecodesParsed, CompilationTime, TimeUnit.SECONDS); inlinedBytecodesPerSecond = MetricRateInPhase.snapshot(phase, inlinedBytecodesPerSecond, InlinedBytecodes, CompilationTime, TimeUnit.SECONDS); } @@ -310,7 +311,7 @@ CompilationTask.withinEnqueue.set(Boolean.FALSE); } - if (Debug.isEnabled()) { + if (Debug.isEnabled() && !quietMeterAndTime) { List<DebugValueMap> topLevelMaps = DebugValueMap.getTopLevelMaps(); List<DebugValue> debugValues = KeyRegistry.getDebugValues(); if (debugValues.size() > 0) { @@ -345,7 +346,7 @@ } phaseTransition("final"); - if (BenchmarkCompilation) { + if (graalRuntime.getConfig().ciTime) { parsedBytecodesPerSecond.printAll("ParsedBytecodesPerSecond"); inlinedBytecodesPerSecond.printAll("InlinedBytecodesPerSecond"); }