Mercurial > hg > truffle
changeset 19059:d5255f4cdf96
CountingProxy should print to TTY
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Fri, 30 Jan 2015 11:28:00 -0800 |
parents | 60ba8c3b4d93 |
children | 7d805868d01d |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/logging/CountingProxy.java |
diffstat | 2 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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");
--- 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<Method, AtomicLong> 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); } }