comparison graal/GraalCompiler/src/com/sun/c1x/debug/IdealGraphPrinter.java @ 2692:79590d6b4a7c

IdealGraphPrinterObserver, GraphvizPrinterObserver: replace possibly invalid characters in file names
author Peter Hofer <peter.hofer@jku.at>
date Wed, 18 May 2011 11:50:58 +0200
parents ed36daed4c43
children b179be22a3db
comparison
equal deleted inserted replaced
2691:4149feada801 2692:79590d6b4a7c
61 public void addOmittedClass(Class<?> clazz) { 61 public void addOmittedClass(Class<?> clazz) {
62 omittedClasses.add(clazz); 62 omittedClasses.add(clazz);
63 } 63 }
64 64
65 /** 65 /**
66 * Starts a new graph document containing a single group of graphs with the given name, short name and byte code 66 * Starts a new graph document.
67 * index (BCI) as properties.
68 */ 67 */
69 public void begin(String name, String shortName, int bci) { 68 public void begin() {
70 stream.println("<graphDocument><group>"); 69 stream.println("<graphDocument>");
70 }
71
72 /**
73 * Starts a new group of graphs with the given name, short name and method byte code index (BCI) as properties.
74 */
75 public void beginGroup(String name, String shortName, int bci) {
76 stream.println("<group>");
71 stream.printf(" <properties><p name='name'>%s</p></properties>%n", escape(name)); 77 stream.printf(" <properties><p name='name'>%s</p></properties>%n", escape(name));
72 stream.printf(" <method name='%s' shortName='%s' bci='%d'/>%n", escape(name), escape(shortName), bci); 78 stream.printf(" <method name='%s' shortName='%s' bci='%d'/>%n", escape(name), escape(shortName), bci);
73 } 79 }
74 80
75 /** 81 /**
76 * Finishes the graph document. 82 * Ends the current group.
83 */
84 public void endGroup() {
85 stream.println("</group>");
86 }
87
88 /**
89 * Finishes the graph document and flushes the output stream.
77 */ 90 */
78 public void end() { 91 public void end() {
79 stream.println("</group></graphDocument>"); 92 stream.println("</graphDocument>");
80 stream.flush(); 93 stream.flush();
81 } 94 }
82 95
83 /** 96 /**
84 * Prints an entire {@link Graph} with the specified title, optionally using short names for nodes. 97 * Prints an entire {@link Graph} with the specified title, optionally using short names for nodes.