# HG changeset patch # User Doug Simon # Date 1382454181 -7200 # Node ID 0916da3633acf54b32aebde0b44ea71c1515da68 # Parent b2882f4ab612d1804d05c380a6c4a37e024d752a only show metric and timer values if -G:Meter or -G:Time is enabled diff -r b2882f4ab612 -r 0916da3633ac 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 Oct 22 15:10:14 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalDebugConfig.java Tue Oct 22 17:03:01 2013 +0200 @@ -69,7 +69,11 @@ // @formatter:on public static boolean areDebugScopePatternsEnabled() { - return DumpOnError.getValue() || Dump.getValue() != null || Meter.getValue() != null || Time.getValue() != null || Log.getValue() != null; + return DumpOnError.getValue() || Dump.getValue() != null || Log.getValue() != null || areMetricsOrTimersEnabled(); + } + + public static boolean areMetricsOrTimersEnabled() { + return Meter.getValue() != null || Time.getValue() != null; } private final DebugFilter logFilter; diff -r b2882f4ab612 -r 0916da3633ac 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 Oct 22 15:10:14 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Tue Oct 22 17:03:01 2013 +0200 @@ -401,7 +401,7 @@ CompilationTask.withinEnqueue.set(Boolean.FALSE); } - if (Debug.isEnabled() && areDebugScopePatternsEnabled()) { + if (Debug.isEnabled() && areMetricsOrTimersEnabled()) { List topLevelMaps = DebugValueMap.getTopLevelMaps(); List debugValues = KeyRegistry.getDebugValues(); if (debugValues.size() > 0) {