Mercurial > hg > graal-jvmci-8
annotate graal/GraalCompiler/src/com/sun/c1x/debug/GraphvizPrinterObserver.java @ 2809:b003ea36fa12
Add block structure to ideal graph visualizer
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Mon, 30 May 2011 14:55:09 +0200 |
parents | e1dad0edd57a |
children | 633e66de40fe |
rev | line source |
---|---|
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
1 /* |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
4 * |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
8 * |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
14 * |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
18 * |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
21 * questions. |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
22 */ |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
23 package com.sun.c1x.debug; |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
24 |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
25 import java.io.*; |
2692
79590d6b4a7c
IdealGraphPrinterObserver, GraphvizPrinterObserver: replace possibly invalid characters in file names
Peter Hofer <peter.hofer@jku.at>
parents:
2691
diff
changeset
|
26 import java.util.regex.*; |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
27 |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
28 import com.oracle.graal.graph.*; |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
29 import com.oracle.graal.graph.vis.*; |
2674
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
30 import com.sun.c1x.*; |
2799
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
31 import com.sun.c1x.ir.*; |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
32 import com.sun.c1x.observer.*; |
2674
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
33 import com.sun.c1x.value.*; |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
34 |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
35 /** |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
36 * Observes compilation events and uses {@link GraphvizPrinter} to produce a control flow graph in the DOT language |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
37 * which can be visualized with Graphviz. |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
38 * |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
39 * @author Peter Hofer |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
40 */ |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
41 public class GraphvizPrinterObserver implements CompilationObserver { |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
42 |
2692
79590d6b4a7c
IdealGraphPrinterObserver, GraphvizPrinterObserver: replace possibly invalid characters in file names
Peter Hofer <peter.hofer@jku.at>
parents:
2691
diff
changeset
|
43 private static final Pattern INVALID_CHAR = Pattern.compile("[^A-Za-z0-9_.-]"); |
79590d6b4a7c
IdealGraphPrinterObserver, GraphvizPrinterObserver: replace possibly invalid characters in file names
Peter Hofer <peter.hofer@jku.at>
parents:
2691
diff
changeset
|
44 |
2674
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
45 private final boolean pdf; |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
46 private int n; |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
47 |
2674
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
48 public GraphvizPrinterObserver(boolean pdf) { |
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
49 this.pdf = pdf; |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
50 } |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
51 |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
52 public void compilationStarted(CompilationEvent event) { |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
53 n = 0; |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
54 } |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
55 |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
56 public void compilationFinished(CompilationEvent event) { |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
57 } |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
58 |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
59 public void compilationEvent(CompilationEvent event) { |
2809
b003ea36fa12
Add block structure to ideal graph visualizer
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2799
diff
changeset
|
60 if (event.getGraph() != null && !TTY.isSuppressed()) { |
b003ea36fa12
Add block structure to ideal graph visualizer
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2799
diff
changeset
|
61 Graph graph = event.getGraph(); |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
62 |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
63 String name = event.getMethod().holder().name(); |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
64 name = name.substring(1, name.length() - 1).replace('/', '.'); |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
65 name = name + "." + event.getMethod().name(); |
2692
79590d6b4a7c
IdealGraphPrinterObserver, GraphvizPrinterObserver: replace possibly invalid characters in file names
Peter Hofer <peter.hofer@jku.at>
parents:
2691
diff
changeset
|
66 |
2674
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
67 String filename = name + "_" + (n++) + "_" + event.getLabel(); |
2692
79590d6b4a7c
IdealGraphPrinterObserver, GraphvizPrinterObserver: replace possibly invalid characters in file names
Peter Hofer <peter.hofer@jku.at>
parents:
2691
diff
changeset
|
68 filename = INVALID_CHAR.matcher(filename).replaceAll("_"); |
2691
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
69 |
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
70 OutputStream out = null; |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
71 try { |
2674
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
72 if (pdf) { |
2691
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
73 ByteArrayOutputStream buffer = new ByteArrayOutputStream(); |
2799
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
74 printGraph(graph, name, buffer); |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
75 |
2691
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
76 out = new FileOutputStream(filename + ".pdf"); |
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
77 GraphvizRunner.process(GraphvizRunner.DOT_LAYOUT, new ByteArrayInputStream(buffer.toByteArray()), out, "pdf"); |
2674
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
78 } else { |
2691
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
79 out = new FileOutputStream(filename + ".gv"); |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
80 |
2799
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
81 printGraph(graph, name, out); |
2674
6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
Lukas Stadler <lukas.stadler@jku.at>
parents:
2648
diff
changeset
|
82 } |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
83 } catch (IOException e) { |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
84 e.printStackTrace(); |
2691
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
85 } finally { |
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
86 if (out != null) { |
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
87 try { |
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
88 out.close(); |
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
89 } catch (IOException e) { |
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
90 } |
4149feada801
GraphvizPrinterObserver: close output stream also in case of exception
Peter Hofer <peter.hofer@jku.at>
parents:
2674
diff
changeset
|
91 } |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
92 } |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
93 } |
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
94 } |
2799
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
95 |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
96 private static void printGraph(Graph graph, String name, OutputStream buffer) { |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
97 GraphvizPrinter printer = new GraphvizPrinter(buffer); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
98 if (C1XOptions.OmitDOTFrameStates) { |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
99 printer.addOmittedClass(FrameState.class); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
100 } |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
101 printer.addClassColor(StartNode.class, "snow3"); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
102 printer.addClassColor(EndNode.class, "snow3"); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
103 printer.addClassColor(LoopBegin.class, "skyblue"); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
104 printer.addClassColor(LoopEnd.class, "skyblue3"); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
105 printer.addClassColor(Unwind.class, "red"); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
106 printer.addClassColor(Return.class, "indianred1"); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
107 printer.begin(name); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
108 printer.print(graph, true); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
109 printer.end(); |
e1dad0edd57a
first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents:
2692
diff
changeset
|
110 } |
2648
d456b679b6de
Add option PrintDOTGraphToFile to produce Graphviz graphs in the DOT language for compiled methods that match PrintFilter
Peter Hofer <peter.hofer@jku.at>
parents:
diff
changeset
|
111 } |