# HG changeset patch # User Doug Simon # Date 1382388474 -7200 # Node ID 1be3cb11f88e702efe6c00dad7074156a6313a8d # Parent 0b0e60214f49939316312bad58b807e9d0ebb873 enable zero-count metrics to be shown (disable with new -G:+SuppressZeroDebugValues option) diff -r 0b0e60214f49 -r 1be3cb11f88e 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 Mon Oct 21 18:37:19 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalDebugConfig.java Mon Oct 21 22:47:54 2013 +0200 @@ -52,6 +52,8 @@ "Complete - aggregate by qualified name%n" + "Thread - aggregate by qualified name and thread") public static final OptionValue DebugValueSummary = new OptionValue<>("Name"); + @Option(help = "Omit reporting 0-value metrics") + public static final OptionValue SuppressZeroDebugValues = new OptionValue<>(false); @Option(help = "Send Graal IR to dump handlers on error") public static final OptionValue DumpOnError = new OptionValue<>(false); @Option(help = "Enable expensive assertions") diff -r 0b0e60214f49 -r 1be3cb11f88e graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/MetricImpl.java --- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/MetricImpl.java Mon Oct 21 18:37:19 2013 +0200 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/internal/MetricImpl.java Mon Oct 21 22:47:54 2013 +0200 @@ -28,6 +28,8 @@ public MetricImpl(String name, boolean conditional) { super(name, conditional); + // Allows for zero-count metrics to be shown + getCurrentValue(); } public void increment() { diff -r 0b0e60214f49 -r 1be3cb11f88e 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 Mon Oct 21 18:37:19 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Mon Oct 21 22:47:54 2013 +0200 @@ -533,7 +533,7 @@ for (DebugValue value : debugValues) { long l = scope.map.getCurrentValue(value.getIndex()); - if (l != 0) { + if (l != 0 || !SuppressZeroDebugValues.getValue()) { scope.print(); printIndent(scope.level + 1); TTY.println(value.getName() + "=" + value.toString(l));