public interface TruffleCompilerListener
CompilableTruffleAST. 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(CompilableTruffleAST compilable,
TruffleCompilationTask task)
Notifies this object when compilation of
compilable is re-tried to diagnose a
compilation problem. |
default void |
onFailure(CompilableTruffleAST compilable,
String reason,
boolean bailout,
boolean permanentBailout,
int tier)
Notifies this object when compilation of
compilable fails. |
void |
onGraalTierFinished(CompilableTruffleAST compilable,
TruffleCompilerListener.GraphInfo graph)
Notifies this object when Graal IR compilation
compilable completes. |
default void |
onSuccess(CompilableTruffleAST compilable,
TruffleInliningData inliningPlan,
TruffleCompilerListener.GraphInfo graph,
TruffleCompilerListener.CompilationResultInfo compilationResultInfo,
int tier)
Notifies this object when compilation of
compilable succeeds. |
void |
onTruffleTierFinished(CompilableTruffleAST compilable,
TruffleInliningData inliningPlan,
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(CompilableTruffleAST compilable, TruffleCompilerListener.GraphInfo graph)
compilable completes. Graal
compilation occurs between TruffleCompilerListener.onTruffleTierFinished(org.graalvm.compiler.truffle.common.CompilableTruffleAST, org.graalvm.compiler.truffle.common.TruffleInliningData, org.graalvm.compiler.truffle.common.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(CompilableTruffleAST compilable, TruffleInliningData inliningPlan, 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 compiledinliningPlan - the inlining plan used during partial evaluationgraph - 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(CompilableTruffleAST compilable, TruffleInliningData inliningPlan, TruffleCompilerListener.GraphInfo graph, TruffleCompilerListener.CompilationResultInfo compilationResultInfo, int tier)
compilable succeeds.compilable - the Truffle AST whose compilation succeededinliningPlan - the inlining plan used during partial evaluationgraph - 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(CompilableTruffleAST 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(CompilableTruffleAST 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.