# HG changeset patch # User Tom Rodriguez # Date 1422646080 28800 # Node ID d5255f4cdf9637c1e8905ae445b726472c560539 # Parent 60ba8c3b4d93c030fa6b638bb9961aa9b95eefdd CountingProxy should print to TTY diff -r 60ba8c3b4d93 -r d5255f4cdf96 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Fri Jan 30 11:26:00 2015 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Fri Jan 30 11:28:00 2015 -0800 @@ -91,6 +91,7 @@ * Do deferred initialization. */ public void completeInitialization() { + TTY.initialize(Options.LogFile.getStream(compilerToVm)); // Proxies for the VM/Compiler interfaces cannot be initialized // in the constructor as proxy creation causes static @@ -109,8 +110,6 @@ this.compilerToVm = toVM; - TTY.initialize(Options.LogFile.getStream(compilerToVm)); - if (Log.getValue() == null && Meter.getValue() == null && Time.getValue() == null && Dump.getValue() == null && Verify.getValue() == null) { if (MethodFilter.getValue() != null) { TTY.println("WARNING: Ignoring MethodFilter option since Log, Meter, Time, Dump and Verify options are all null"); diff -r 60ba8c3b4d93 -r d5255f4cdf96 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/logging/CountingProxy.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/logging/CountingProxy.java Fri Jan 30 11:26:00 2015 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/logging/CountingProxy.java Fri Jan 30 11:28:00 2015 -0800 @@ -22,7 +22,6 @@ */ package com.oracle.graal.hotspot.logging; -import java.io.*; import java.lang.reflect.*; import java.util.*; import java.util.concurrent.*; @@ -97,13 +96,12 @@ protected void print() { long sum = 0; - PrintStream out = System.out; for (Map.Entry entry : calls.entrySet()) { Method method = entry.getKey(); long count = entry.getValue().get(); sum += count; - out.println(delegate.getClass().getSimpleName() + "." + method.getName() + ": " + count); + TTY.println(delegate.getClass().getSimpleName() + "." + method.getName() + ": " + count); } - out.println(delegate.getClass().getSimpleName() + " calls: " + sum); + TTY.println(delegate.getClass().getSimpleName() + " calls: " + sum); } }