changeset 16900:34b000f69af3

made debug value printing work if individual timers or metrics are enabled without -G:Time or -G:Meter being specified
author Doug Simon <doug.simon@oracle.com>
date Sat, 23 Aug 2014 00:18:14 +0200
parents 6f245b6d2936
children 451468f7340b
files graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/DebugValuesPrinter.java
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java	Fri Aug 22 23:55:08 2014 +0200
+++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java	Sat Aug 23 00:18:14 2014 +0200
@@ -1087,6 +1087,14 @@
         enabledTimers = timers.isEmpty() ? null : timers;
     }
 
+    public static boolean areUnconditionalTimersEnabled() {
+        return enabledTimers != null && !enabledTimers.isEmpty();
+    }
+
+    public static boolean areUnconditionalMetricsEnabled() {
+        return enabledMetrics != null && !enabledMetrics.isEmpty();
+    }
+
     protected static void parseMetricAndTimerSystemProperties(Set<String> metrics, Set<String> timers) {
         do {
             try {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/DebugValuesPrinter.java	Fri Aug 22 23:55:08 2014 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/DebugValuesPrinter.java	Sat Aug 23 00:18:14 2014 +0200
@@ -38,7 +38,7 @@
 public class DebugValuesPrinter {
 
     public void printDebugValues(String phase, boolean reset) throws GraalInternalError {
-        if (Debug.isEnabled() && areMetricsOrTimersEnabled()) {
+        if (Debug.areUnconditionalMetricsEnabled() || Debug.areUnconditionalTimersEnabled() || (Debug.isEnabled() && areMetricsOrTimersEnabled())) {
             TTY.println();
             if (phase != null) {
                 TTY.println("<DebugValues:" + phase + ">");