Mercurial > hg > truffle
comparison graal/com.oracle.graal.printer/src/com/oracle/graal/printer/CFGPrinterObserver.java @ 21543:93c50cefb9e8
moved GraalInternalError to com.oracle.jvmci.common and renamed it to JVMCIError (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 25 May 2015 23:30:34 +0200 |
parents | 39e99cf01468 |
children | b1530a6cce8c |
comparison
equal
deleted
inserted
replaced
21542:543957c1c6a6 | 21543:93c50cefb9e8 |
---|---|
26 import java.util.*; | 26 import java.util.*; |
27 import java.util.concurrent.atomic.*; | 27 import java.util.concurrent.atomic.*; |
28 | 28 |
29 import com.oracle.graal.api.code.*; | 29 import com.oracle.graal.api.code.*; |
30 import com.oracle.graal.api.meta.*; | 30 import com.oracle.graal.api.meta.*; |
31 import com.oracle.graal.compiler.common.*; | |
32 import com.oracle.graal.compiler.gen.*; | 31 import com.oracle.graal.compiler.gen.*; |
33 import com.oracle.graal.debug.*; | 32 import com.oracle.graal.debug.*; |
34 import com.oracle.graal.graph.*; | 33 import com.oracle.graal.graph.*; |
35 import com.oracle.graal.java.*; | 34 import com.oracle.graal.java.*; |
36 import com.oracle.graal.lir.*; | 35 import com.oracle.graal.lir.*; |
37 import com.oracle.graal.lir.alloc.lsra.*; | 36 import com.oracle.graal.lir.alloc.lsra.*; |
38 import com.oracle.graal.lir.stackslotalloc.*; | 37 import com.oracle.graal.lir.stackslotalloc.*; |
39 import com.oracle.graal.nodes.*; | 38 import com.oracle.graal.nodes.*; |
40 import com.oracle.graal.nodes.cfg.*; | 39 import com.oracle.graal.nodes.cfg.*; |
41 import com.oracle.graal.phases.schedule.*; | 40 import com.oracle.graal.phases.schedule.*; |
41 import com.oracle.jvmci.common.*; | |
42 | 42 |
43 /** | 43 /** |
44 * Observes compilation events and uses {@link CFGPrinter} to produce a control flow graph for the | 44 * Observes compilation events and uses {@link CFGPrinter} to produce a control flow graph for the |
45 * <a href="http://java.net/projects/c1visualizer/">C1 Visualizer</a>. | 45 * <a href="http://java.net/projects/c1visualizer/">C1 Visualizer</a>. |
46 */ | 46 */ |
122 cfgFile = new File("compilations-" + timestamp + "_" + uniqueId.incrementAndGet() + ".cfg"); | 122 cfgFile = new File("compilations-" + timestamp + "_" + uniqueId.incrementAndGet() + ".cfg"); |
123 try { | 123 try { |
124 OutputStream out = new BufferedOutputStream(new FileOutputStream(cfgFile)); | 124 OutputStream out = new BufferedOutputStream(new FileOutputStream(cfgFile)); |
125 cfgPrinter = new CFGPrinter(out); | 125 cfgPrinter = new CFGPrinter(out); |
126 } catch (FileNotFoundException e) { | 126 } catch (FileNotFoundException e) { |
127 throw new GraalInternalError("Could not open " + cfgFile.getAbsolutePath()); | 127 throw new JVMCIError("Could not open " + cfgFile.getAbsolutePath()); |
128 } | 128 } |
129 TTY.println("CFGPrinter: Output to file %s", cfgFile); | 129 TTY.println("CFGPrinter: Output to file %s", cfgFile); |
130 } | 130 } |
131 | 131 |
132 if (!checkMethodScope()) { | 132 if (!checkMethodScope()) { |