Mercurial > hg > truffle
changeset 17302:7c58f75be8d6
fixed regression in debug value printing and removed unused support for printing per VM phase
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 01 Oct 2014 16:03:11 +0200 |
parents | ed30fa9d37ac |
children | ddc424ed8966 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/DebugValuesPrinter.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java |
diffstat | 2 files changed, 12 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/DebugValuesPrinter.java Wed Oct 01 14:56:01 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/DebugValuesPrinter.java Wed Oct 01 16:03:11 2014 +0200 @@ -37,13 +37,9 @@ */ public class DebugValuesPrinter { - public void printDebugValues(String phase, boolean reset) throws GraalInternalError { + public void printDebugValues() throws GraalInternalError { TTY.println(); - if (phase != null) { - TTY.println("<DebugValues:" + phase + ">"); - } else { - TTY.println("<DebugValues>"); - } + TTY.println("<DebugValues>"); List<DebugValueMap> topLevelMaps = DebugValueMap.getTopLevelMaps(); List<DebugValue> debugValues = KeyRegistry.getDebugValues(); if (debugValues.size() > 0) { @@ -89,10 +85,8 @@ default: throw new GraalInternalError("Unknown summary type: %s", summary); } - if (reset) { - for (DebugValueMap topLevelMap : topLevelMaps) { - topLevelMap.reset(); - } + for (DebugValueMap topLevelMap : topLevelMaps) { + topLevelMap.reset(); } } catch (Throwable e) { // Don't want this to change the exit status of the VM @@ -101,11 +95,7 @@ e.printStackTrace(); } } - if (phase != null) { - TTY.println("</DebugValues:" + phase + ">"); - } else { - TTY.println("</DebugValues>"); - } + TTY.println("</DebugValues>"); } private void flattenChildren(DebugValueMap map, DebugValueMap globalMap) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Wed Oct 01 14:56:01 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Wed Oct 01 16:03:11 2014 +0200 @@ -132,11 +132,12 @@ throw new GraalInternalError("Unsupported value for DebugSummaryValue: %s", summary); } } - if (Debug.areUnconditionalMetricsEnabled() || Debug.areUnconditionalTimersEnabled() || (Debug.isEnabled() && areMetricsOrTimersEnabled())) { - // This must be created here to avoid loading the DebugValuesPrinter class - // during shutdown() which in turn can cause a deadlock - debugValuesPrinter = new DebugValuesPrinter(); - } + } + + if (Debug.areUnconditionalMetricsEnabled() || Debug.areUnconditionalTimersEnabled() || (Debug.isEnabled() && areMetricsOrTimersEnabled())) { + // This must be created here to avoid loading the DebugValuesPrinter class + // during shutdown() which in turn can cause a deadlock + debugValuesPrinter = new DebugValuesPrinter(); } // Complete initialization of backends @@ -588,7 +589,7 @@ @SuppressWarnings("unused") private void shutdown() throws Exception { if (debugValuesPrinter != null) { - debugValuesPrinter.printDebugValues(ResetDebugValuesAfterBootstrap.getValue() ? "application" : null, false); + debugValuesPrinter.printDebugValues(); } phaseTransition("final");