# HG changeset patch # User Doug Simon # Date 1353328407 -3600 # Node ID e35077f6d2a257dc805490d5c8aacf36996e732e # Parent dd0dd0321e2a5b6e5e01db6932ff89243e7883c4 removed cached LogStream in GraphBuilderPhase diff -r dd0dd0321e2a -r e35077f6d2a2 graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Sun Nov 18 22:45:43 2012 +0100 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Mon Nov 19 13:33:27 2012 +0100 @@ -79,7 +79,6 @@ private ProfilingInfo profilingInfo; private BytecodeStream stream; // the bytecode stream - private final LogStream log; private FrameStateBuilder frameState; // the current execution state private Block currentBlock; @@ -113,7 +112,6 @@ this.graphBuilderConfig = graphBuilderConfig; this.optimisticOpts = optimisticOpts; this.runtime = runtime; - this.log = GraalOptions.TraceBytecodeParserLevel > 0 ? new LogStream(TTY.out()) : null; assert runtime != null; } @@ -131,7 +129,12 @@ methodSynchronizedObject = null; this.currentGraph = graph; this.frameState = new FrameStateBuilder(method, graph, graphBuilderConfig.eagerResolving()); - build(); + TTY.Filter filter = new TTY.Filter(GraalOptions.PrintFilter, method); + try { + build(); + } finally { + filter.remove(); + } } @Override @@ -148,11 +151,6 @@ } private void build() { - if (log != null) { - log.println(); - log.println("Compiling " + method); - } - if (GraalOptions.PrintProfilingInformation) { TTY.println("Profiling info for " + method); TTY.println(MetaUtil.indent(MetaUtil.profileToString(profilingInfo, method, CodeUtil.NEW_LINE), " ")); @@ -1533,14 +1531,14 @@ private void traceState() { if (GraalOptions.TraceBytecodeParserLevel >= TRACELEVEL_STATE && !TTY.isSuppressed()) { - log.println(String.format("| state [nr locals = %d, stack depth = %d, method = %s]", frameState.localsSize(), frameState.stackSize(), method)); + TTY.println(String.format("| state [nr locals = %d, stack depth = %d, method = %s]", frameState.localsSize(), frameState.stackSize(), method)); for (int i = 0; i < frameState.localsSize(); ++i) { ValueNode value = frameState.localAt(i); - log.println(String.format("| local[%d] = %-8s : %s", i, value == null ? "bogus" : value.kind().getJavaName(), value)); + TTY.println(String.format("| local[%d] = %-8s : %s", i, value == null ? "bogus" : value.kind().getJavaName(), value)); } for (int i = 0; i < frameState.stackSize(); ++i) { ValueNode value = frameState.stackAt(i); - log.println(String.format("| stack[%d] = %-8s : %s", i, value == null ? "bogus" : value.kind().getJavaName(), value)); + TTY.println(String.format("| stack[%d] = %-8s : %s", i, value == null ? "bogus" : value.kind().getJavaName(), value)); } } } @@ -1774,7 +1772,7 @@ if (!currentBlock.jsrScope.isEmpty()) { sb.append(' ').append(currentBlock.jsrScope); } - log.println(sb.toString()); + TTY.println(sb.toString()); } }