# HG changeset patch # User Doug Simon # Date 1359581584 -3600 # Node ID 7cae58134ff79c410f021d35628d5fa5449637bd # Parent 140d4d4ab3b9db4b4ded94578b8d5686e9a0bb06 collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true diff -r 140d4d4ab3b9 -r 7cae58134ff7 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Wed Jan 30 21:36:28 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Wed Jan 30 22:33:04 2013 +0100 @@ -36,6 +36,7 @@ public boolean windowsOs; public int codeEntryAlignment; public boolean verifyOops; + public boolean ciTime; public boolean useFastLocking; public boolean useTLAB; public boolean useBiasedLocking; diff -r 140d4d4ab3b9 -r 7cae58134ff7 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java --- 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 topLevelMaps = DebugValueMap.getTopLevelMaps(); List 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"); } diff -r 140d4d4ab3b9 -r 7cae58134ff7 mx/sanitycheck.py --- a/mx/sanitycheck.py Wed Jan 30 21:36:28 2013 +0100 +++ b/mx/sanitycheck.py Wed Jan 30 22:33:04 2013 +0100 @@ -290,7 +290,7 @@ parser.addMatcher(scoreMatcher) if self.benchmarkCompilationRate: - opts.append('-Dgraal.benchmark.compilation=true') + opts.append('-XX:+CITime') bps = re.compile(r"ParsedBytecodesPerSecond@final: (?P[0-9]+)") ibps = re.compile(r"InlinedBytecodesPerSecond@final: (?P[0-9]+)") parser.addMatcher(ValuesMatcher(bps, {'group' : 'ParsedBytecodesPerSecond', 'name' : self.name, 'score' : ''})) diff -r 140d4d4ab3b9 -r 7cae58134ff7 src/share/vm/graal/graalCompilerToVM.cpp --- a/src/share/vm/graal/graalCompilerToVM.cpp Wed Jan 30 21:36:28 2013 +0100 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Wed Jan 30 22:33:04 2013 +0100 @@ -607,6 +607,7 @@ set_boolean("windowsOs", false); #endif set_boolean("verifyOops", VerifyOops); + set_boolean("ciTime", CITime); set_boolean("useFastLocking", GraalUseFastLocking); set_boolean("useBiasedLocking", UseBiasedLocking); set_boolean("usePopCountInstruction", UsePopCountInstruction);