Class GraphOutput<G,M>
java.lang.Object
jdk.graal.compiler.graphio.GraphOutput<G,M>
- Type Parameters:
G
- the type of graph this instance handlesM
- the type of methods this instance handles
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, WritableByteChannel
Instance of output to dump informations about a compiler compilations.
- Since:
- 19.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builder to configure and create an instance ofGraphOutput
. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name of stream attribute to identify the VM execution, allows to join different GraphOutput streams. -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginGroup
(G forGraph, String name, String shortName, M method, int bci, Map<? extends Object, ? extends Object> properties) Begins a compilation group.void
close()
Closes the output.void
endGroup()
Ends compilation group.boolean
isOpen()
Checks if theGraphOutput
is open.static <G,
N, C, P> GraphOutput.Builder <G, N, ?> newBuilder
(GraphStructure<G, N, C, P> structure) Creates new builder to configure a future instance ofGraphOutput
.void
print
(G graph, Map<? extends Object, ? extends Object> properties, int id, String format, Object... args) Prints a single graph.int
write
(ByteBuffer src) Writes raw bytes intoGraphOutput
.
-
Field Details
-
ATTR_VM_ID
Name of stream attribute to identify the VM execution, allows to join different GraphOutput streams. The value should be the same for all relatedGraphOutput
s.- Since:
- 20.2.0
- See Also:
-
-
Method Details
-
newBuilder
Creates new builder to configure a future instance ofGraphOutput
.- Type Parameters:
G
- the type of the graphN
- the type of the nodesC
- the type of the node classesP
- the type of the ports- Parameters:
structure
- description of the structure of the graph- Returns:
- the builder to configure
-
beginGroup
public void beginGroup(G forGraph, String name, String shortName, M method, int bci, Map<? extends Object, ? extends Object> properties) throws IOException Begins a compilation group.- Parameters:
forGraph
-name
-shortName
-method
-bci
-properties
-- Throws:
IOException
-
print
public void print(G graph, Map<? extends Object, ? extends Object> properties, int id, String format, Object... args) throws IOException Prints a single graph.- Parameters:
graph
-properties
-id
-format
-args
-- Throws:
IOException
-
endGroup
-
close
-
isOpen
public boolean isOpen()Checks if theGraphOutput
is open.- Specified by:
isOpen
in interfaceChannel
- Returns:
- true if the
GraphOutput
is open. - Since:
- 19.0
-
write
Writes raw bytes intoGraphOutput
.- Specified by:
write
in interfaceWritableByteChannel
- Parameters:
src
- the bytes to write- Returns:
- the number of bytes written, possibly zero
- Throws:
IOException
- in case of IO error- Since:
- 19.0
-