# HG changeset patch # User Doug Simon # Date 1378820542 -7200 # Node ID 9d9c944f29401264a3b31fac139a6510add034b6 # Parent 6b6c6e5d0fc27820ad13c35ecce8638308bf6a1a removed side effect of -XX:+CITime on -G:Meter and -G:Time (GRAAL-195) diff -r 6b6c6e5d0fc2 -r 9d9c944f2940 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalDebugConfig.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalDebugConfig.java Tue Sep 10 15:40:28 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalDebugConfig.java Tue Sep 10 15:42:22 2013 +0200 @@ -66,7 +66,7 @@ }; // @formatter:on - public static boolean isDebugEnabled() { + public static boolean areDebugScopePatternsEnabled() { return Dump.getValue() != null || Meter.getValue() != null || Time.getValue() != null || Log.getValue() != null; } diff -r 6b6c6e5d0fc2 -r 9d9c944f2940 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java Tue Sep 10 15:40:28 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java Tue Sep 10 15:42:22 2013 +0200 @@ -24,6 +24,7 @@ package com.oracle.graal.hotspot; import static com.oracle.graal.compiler.GraalDebugConfig.*; +import static com.oracle.graal.hotspot.HotSpotVMConfig.*; import static java.nio.file.Files.*; import java.io.*; @@ -180,7 +181,7 @@ * {@link #setOption(String)}. */ public static void finalizeOptions() { - if (Dump.getValue() != null || Meter.getValue() != null || Time.getValue() != null || Log.getValue() != null || HotSpotVMConfig.getVMOption("CITime")) { + if (areDebugScopePatternsEnabled() || getVMOption("CITime")) { Debug.enable(); } } diff -r 6b6c6e5d0fc2 -r 9d9c944f2940 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 Tue Sep 10 15:40:28 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Tue Sep 10 15:42:22 2013 +0200 @@ -29,6 +29,7 @@ import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*; import static com.oracle.graal.java.GraphBuilderPhase.*; import static com.oracle.graal.phases.GraalOptions.*; +import static com.oracle.graal.phases.common.InliningUtil.*; import java.io.*; import java.lang.reflect.*; @@ -51,7 +52,6 @@ import com.oracle.graal.options.*; import com.oracle.graal.phases.*; import com.oracle.graal.phases.PhasePlan.PhasePosition; -import com.oracle.graal.phases.common.*; import com.oracle.graal.printer.*; import com.oracle.graal.replacements.*; @@ -105,8 +105,6 @@ private PrintStream log = System.out; - private boolean quietMeterAndTime; - private long compilerStartTime; public VMToCompilerImpl(HotSpotGraalRuntime compiler) { @@ -165,9 +163,9 @@ } if (config.ciTime) { - quietMeterAndTime = (Meter.getValue() == null && Time.getValue() == null); - Meter.setValue(""); - Time.setValue(""); + BytecodesParsed.setConditional(false); + InlinedBytecodes.setConditional(false); + CompilationTime.setConditional(false); } if (Debug.isEnabled()) { @@ -373,7 +371,7 @@ CompilationStatistics.clear(phase); if (graalRuntime.getConfig().ciTime) { parsedBytecodesPerSecond = MetricRateInPhase.snapshot(phase, parsedBytecodesPerSecond, BytecodesParsed, CompilationTime, TimeUnit.SECONDS); - inlinedBytecodesPerSecond = MetricRateInPhase.snapshot(phase, inlinedBytecodesPerSecond, InliningUtil.InlinedBytecodes, CompilationTime, TimeUnit.SECONDS); + inlinedBytecodesPerSecond = MetricRateInPhase.snapshot(phase, inlinedBytecodesPerSecond, InlinedBytecodes, CompilationTime, TimeUnit.SECONDS); } } @@ -475,7 +473,7 @@ CompilationTask.withinEnqueue.set(Boolean.FALSE); } - if (Debug.isEnabled() && !quietMeterAndTime) { + if (Debug.isEnabled() && areDebugScopePatternsEnabled()) { List topLevelMaps = DebugValueMap.getTopLevelMaps(); List debugValues = KeyRegistry.getDebugValues(); if (debugValues.size() > 0) {