Mercurial > hg > graal-compiler
changeset 22722:cbc844f64937
added HotSpotJVMCIRuntimeProvider.getLogStream() and made CompilerToVM.writeDebugOutput and CompilerToVm.flushDebugOutput package-private
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 29 Sep 2015 15:56:37 +0200 |
parents | 2d6bcedb5058 |
children | 638bfbc67270 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/PrintStreamOption.java mx.graal/suite.py |
diffstat | 2 files changed, 5 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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"},