public interface TruffleCompilerListener
TruffleCompilable. The events are
described only in terms of types that can be easily serialized or proxied across a heap boundary.| Modifier and Type | Interface and Description |
|---|---|
static interface |
TruffleCompilerListener.CompilationResultInfo
Summary information for the result of a compilation.
|
static interface |
TruffleCompilerListener.GraphInfo
Summary information for a compiler graph.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
onCompilationRetry(TruffleCompilable compilable,
TruffleCompilationTask task)
Notifies this object when compilation of
compilable is re-tried to diagnose a
compilation problem. |
default void |
onFailure(TruffleCompilable compilable,
String reason,
boolean bailout,
boolean permanentBailout,
int tier)
Notifies this object when compilation of
compilable fails. |
void |
onGraalTierFinished(TruffleCompilable compilable,
TruffleCompilerListener.GraphInfo graph)
Notifies this object when Graal IR compilation
compilable completes. |
default void |
onSuccess(TruffleCompilable compilable,
TruffleCompilationTask task,
TruffleCompilerListener.GraphInfo graph,
TruffleCompilerListener.CompilationResultInfo compilationResultInfo,
int tier)
Notifies this object when compilation of
compilable succeeds. |
void |
onTruffleTierFinished(TruffleCompilable compilable,
TruffleCompilationTask task,
TruffleCompilerListener.GraphInfo graph)
Notifies this object when compilation of
compilable has completed partial evaluation
and is about to perform compilation of the graph produced by partial evaluation. |
void onGraalTierFinished(TruffleCompilable compilable, TruffleCompilerListener.GraphInfo graph)
compilable completes. Graal
compilation occurs between TruffleCompilerListener.onTruffleTierFinished(com.oracle.truffle.compiler.TruffleCompilable, com.oracle.truffle.compiler.TruffleCompilationTask, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo) and code installation.compilable - the call target that was compiledgraph - the graph representing compilable. The graph object is only
valid for the lifetime of a call to this method. Invoking any TruffleCompilerListener.GraphInfo
method on graph after this method returns will result in an
IllegalStateException.void onTruffleTierFinished(TruffleCompilable compilable, TruffleCompilationTask task, TruffleCompilerListener.GraphInfo graph)
compilable has completed partial evaluation
and is about to perform compilation of the graph produced by partial evaluation.compilable - the call target being compiledtask - the compilation taskgraph - the graph representing compilable. The graph object is only
valid for the lifetime of a call to this method. Invoking any TruffleCompilerListener.GraphInfo
method on graph after this method returns will result in an
IllegalStateException.default void onSuccess(TruffleCompilable compilable, TruffleCompilationTask task, TruffleCompilerListener.GraphInfo graph, TruffleCompilerListener.CompilationResultInfo compilationResultInfo, int tier)
compilable succeeds.compilable - the Truffle AST whose compilation succeededtask - the compilation taskgraph - the graph representing compilable. The graph object is only
valid for the lifetime of a call to this method. Invoking any TruffleCompilerListener.GraphInfo
method on graph after this method returns will result in an
IllegalStateException.compilationResultInfo - the result of a compilation. The compilationResultInfo
object is only valid for the lifetime of a call to this method. Invoking any
TruffleCompilerListener.CompilationResultInfo method on compilationResultInfo after this
method returns will result in an IllegalStateException.tier - Which compilation tier was the compilationdefault void onFailure(TruffleCompilable compilable, String reason, boolean bailout, boolean permanentBailout, int tier)
compilable fails.compilable - the Truffle AST whose compilation failedreason - the reason compilation failedbailout - specifies whether the failure was a bailout or an error in the compiler. A
bailout means the compiler aborted the compilation based on some of property of
target (e.g., too big). A non-bailout means an unexpected error in the
compiler itself.permanentBailout - specifies if a bailout is due to a condition that probably won't
change if the target is compiled again. This value is meaningless if
bailout == false.tier - Which compilation tier was the compilationdefault void onCompilationRetry(TruffleCompilable compilable, TruffleCompilationTask task)
compilable is re-tried to diagnose a
compilation problem.compilable - the Truffle AST which is going to be re-compiled.task - Which compilation task is in question.