# HG changeset patch # User Doug Simon # Date 1443534997 -7200 # Node ID cbc844f64937b3337010b06c08259fe876630140 # Parent 2d6bcedb505841b6d92cc097bb779ebbe30823bc added HotSpotJVMCIRuntimeProvider.getLogStream() and made CompilerToVM.writeDebugOutput and CompilerToVm.flushDebugOutput package-private diff -r 2d6bcedb5058 -r cbc844f64937 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/PrintStreamOption.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/PrintStreamOption.java Tue Sep 29 16:01:13 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/PrintStreamOption.java Tue Sep 29 15:56:37 2015 +0200 @@ -22,16 +22,14 @@ */ package com.oracle.graal.hotspot; -import static jdk.internal.jvmci.hotspot.CompilerToVM.compilerToVM; +import static jdk.internal.jvmci.hotspot.HotSpotJVMCIRuntime.runtime; import java.io.FileNotFoundException; import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; import java.io.PrintStream; import java.lang.management.ManagementFactory; -import jdk.internal.jvmci.hotspot.CompilerToVM; +import jdk.internal.jvmci.hotspot.HotSpotJVMCIRuntimeProvider; import jdk.internal.jvmci.options.OptionValue; /** @@ -77,7 +75,7 @@ /** * Gets the print stream configured by this option. If no file is configured, the print stream - * will output to {@link CompilerToVM#writeDebugOutput(byte[], int, int)}. + * will output to HotSpot's {@link HotSpotJVMCIRuntimeProvider#getLogStream() log} stream. */ public PrintStream getStream() { if (ps == null) { @@ -100,39 +98,7 @@ } } } else { - OutputStream ttyOut = new OutputStream() { - CompilerToVM vm; - - private CompilerToVM vm() { - if (vm == null) { - vm = compilerToVM(); - } - return vm; - } - - @Override - public void write(byte[] b, int off, int len) throws IOException { - if (b == null) { - throw new NullPointerException(); - } else if (off < 0 || off > b.length || len < 0 || (off + len) > b.length || (off + len) < 0) { - throw new IndexOutOfBoundsException(); - } else if (len == 0) { - return; - } - vm().writeDebugOutput(b, off, len); - } - - @Override - public void write(int b) throws IOException { - write(new byte[]{(byte) b}, 0, 1); - } - - @Override - public void flush() throws IOException { - vm().flushDebugOutput(); - } - }; - ps = new PrintStream(ttyOut); + ps = new PrintStream(runtime().getLogStream()); } } return ps; diff -r 2d6bcedb5058 -r cbc844f64937 mx.graal/suite.py --- a/mx.graal/suite.py Tue Sep 29 16:01:13 2015 +0200 +++ b/mx.graal/suite.py Tue Sep 29 15:56:37 2015 +0200 @@ -6,7 +6,7 @@ "suites": [ { "name" : "jvmci", - "version" : "545590b1ab83c00b653ec3143ff876a0c42306c4", + "version" : "b6b46b741102e33d6c7cf04266b69dc95b18a632", "urls" : [ {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"}, {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},