public interface GraalTruffleRuntimeListener
OptimizedCallTarget. The states for a OptimizedCallTarget instance can be
described using the following deterministic automata: *
( (split | (queue . unqueue))*
. queue . started
. (truffleTierFinished . graalTierFinished . success)
| ([truffleTierFinished] . [graalTierFinished] . failed)
. invalidate )*
Note: | is the 'or' and . is the sequential operator. The
* represents the Kleene Closure.
| Modifier and Type | Method and Description |
|---|---|
static void |
addASTSizeProperty(OptimizedCallTarget target,
Map<String,Object> properties) |
static boolean |
isPermanentFailure(boolean bailout,
boolean permanentBailout)
Determines if a failure is permanent.
|
default void |
onCompilationDeoptimized(OptimizedCallTarget target,
com.oracle.truffle.api.frame.Frame frame)
Notifies this object when
target has just deoptimized and is now executing in the
Truffle interpreter instead of executing compiled code. |
default void |
onCompilationDequeued(OptimizedCallTarget target,
Object source,
CharSequence reason,
int tier)
Notifies this object after
target is removed from the compilation queue. |
default void |
onCompilationFailed(OptimizedCallTarget target,
String reason,
boolean bailout,
boolean permanentBailout,
int tier)
Notifies this object when compilation of
target fails. |
default void |
onCompilationGraalTierFinished(OptimizedCallTarget target,
TruffleCompilerListener.GraphInfo graph)
Notifies this object when Graal compilation of a call target completes.
|
default void |
onCompilationInvalidated(OptimizedCallTarget target,
Object source,
CharSequence reason)
Notifies this object when
target is invalidated. |
default void |
onCompilationQueued(OptimizedCallTarget target,
int tier)
Notifies this object after
target is added to the compilation queue. |
default void |
onCompilationSplit(OptimizedDirectCallNode callNode)
Notifies this object when the target of a Truffle call node is
cloned.
|
default void |
onCompilationSplitFailed(OptimizedDirectCallNode callNode,
CharSequence reason)
Notifies this object when the target of a Truffle call node should be split but, for given
reason, could not be.
|
default void |
onCompilationStarted(OptimizedCallTarget target,
TruffleCompilationTask task)
Notifies this object when compilation of
target is about to start. |
default void |
onCompilationSuccess(OptimizedCallTarget target,
TruffleInlining inliningDecision,
TruffleCompilerListener.GraphInfo graph,
TruffleCompilerListener.CompilationResultInfo result,
int tier)
Notifies this object when compilation of
target succeeds. |
default void |
onCompilationTruffleTierFinished(OptimizedCallTarget target,
TruffleInlining inliningDecision,
TruffleCompilerListener.GraphInfo graph)
Notifies this object when compilation of
target has completed partial evaluation and
is about to perform compilation of the graph produced by partial evaluation. |
default void |
onEngineClosed(EngineData runtimeData)
Notifies this object an engine using the
GraalTruffleRuntime was closed. |
default void |
onShutdown()
Notifies this object the
GraalTruffleRuntime is being shut down. |
default void onCompilationSplit(OptimizedDirectCallNode callNode)
callNode - the call node whose target has just been cloneddefault void onCompilationSplitFailed(OptimizedDirectCallNode callNode, CharSequence reason)
callNode - the call node whose where splitting could not occur.reason - why splitting of this node could not occurdefault void onCompilationQueued(OptimizedCallTarget target, int tier)
target is added to the compilation queue.target - the call target that has just been enqueued for compilationtier - Which compilation tier is in question.default void onCompilationDequeued(OptimizedCallTarget target, Object source, CharSequence reason, int tier)
target is removed from the compilation queue.target - the call target that has just been removed from the compilation queuesource - the source object that caused the compilation to be unqueued. For example the
source Node object. May be null.reason - a textual description of the reason why the compilation was unqueued. May be
null.tier - Which compilation tier is in question.default void onCompilationStarted(OptimizedCallTarget target, TruffleCompilationTask task)
target is about to start.target - the call target about to be compiledtask - which compilation task is in question.default void onCompilationTruffleTierFinished(OptimizedCallTarget target, TruffleInlining inliningDecision, TruffleCompilerListener.GraphInfo graph)
target has completed partial evaluation and
is about to perform compilation of the graph produced by partial evaluation.target - the call target being compiledinliningDecision - the inlining plan used during partial evaluationgraph - access to compiler graph infodefault void onCompilationGraalTierFinished(OptimizedCallTarget target, TruffleCompilerListener.GraphInfo graph)
GraalTruffleRuntimeListener.onCompilationTruffleTierFinished(org.graalvm.compiler.truffle.runtime.OptimizedCallTarget, org.graalvm.compiler.truffle.runtime.TruffleInlining, org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo) and code installation.target - the call target that was compiledgraph - the graph representing targetdefault void onCompilationSuccess(OptimizedCallTarget target, TruffleInlining inliningDecision, TruffleCompilerListener.GraphInfo graph, TruffleCompilerListener.CompilationResultInfo result, int tier)
target succeeds.target - the call target whose compilation succeededinliningDecision - the inlining plan used during the compilationgraph - access to compiler graph inforesult - access to compilation result infotier - Which compilation tier is in question.default void onCompilationFailed(OptimizedCallTarget target, String reason, boolean bailout, boolean permanentBailout, int tier)
target fails.target - the call target whose compilation failedreason - a description of the failurebailout - 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 is in question.default void onCompilationInvalidated(OptimizedCallTarget target, Object source, CharSequence reason)
target is invalidated.target - the call target whose compiled code was just invalidatedsource - the source object that caused the compilation to be invalidated. For example
the source Node object. May be null.reason - a textual description of the reason why the compilation was invalidated. May be
null.default void onCompilationDeoptimized(OptimizedCallTarget target, com.oracle.truffle.api.frame.Frame frame)
target has just deoptimized and is now executing in the
Truffle interpreter instead of executing compiled code.target - the call target whose compiled code was just deoptimizedframe - default void onShutdown()
GraalTruffleRuntime is being shut down.default void onEngineClosed(EngineData runtimeData)
GraalTruffleRuntime was closed.runtimeData - the engine's compiler configurationstatic void addASTSizeProperty(OptimizedCallTarget target, Map<String,Object> properties)
static boolean isPermanentFailure(boolean bailout,
boolean permanentBailout)