Class StatisticsListener
java.lang.Object
com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener
com.oracle.truffle.runtime.debug.StatisticsListener
- All Implemented Interfaces:
OptimizedTruffleRuntimeListener
-
Field Summary
Fields inherited from class AbstractGraalTruffleRuntimeListener
runtime -
Method Summary
Modifier and TypeMethodDescriptionstatic StatisticsListenerstatic voidinstall(OptimizedTruffleRuntime runtime) voidonCompilationDequeued(OptimizedCallTarget target, Object source, CharSequence reason, int tier) Notifies this object aftertargetis removed from the compilation queue.voidonCompilationFailed(OptimizedCallTarget target, String reason, boolean bailout, boolean permanentBailout, int tier, Supplier<String> lazyStackTrace) Notifies this object when compilation oftargetfails.voidonCompilationGraalTierFinished(OptimizedCallTarget target, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo graph) Notifies this object when Graal compilation of a call target completes.voidonCompilationInvalidated(OptimizedCallTarget target, Object source, CharSequence reason) Notifies this object whentargetis invalidated.voidonCompilationQueued(OptimizedCallTarget target, int tier) Notifies this object aftertargetis added to the compilation queue.voidonCompilationSplit(OptimizedDirectCallNode callNode) Notifies this object when the target of a Truffle call node is cloned.voidonCompilationStarted(OptimizedCallTarget target, AbstractCompilationTask task) Notifies this object when compilation oftargetis about to start.voidonCompilationSuccess(OptimizedCallTarget target, AbstractCompilationTask task, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo graph, com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo result) Notifies this object when compilation oftargetsucceeds.voidonCompilationTruffleTierFinished(OptimizedCallTarget target, AbstractCompilationTask task, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo graph) Notifies this object when compilation oftargethas completed partial evaluation and is about to perform compilation of the graph produced by partial evaluation.voidonEngineClosed(EngineData runtimeData) Notifies this object an engine using theOptimizedTruffleRuntimewas closed.
-
Method Details
-
install
-
createEngineListener
-
onCompilationSplit
Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object when the target of a Truffle call node is cloned.- Parameters:
callNode- the call node whose target has just been cloned
-
onCompilationQueued
Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object aftertargetis added to the compilation queue.- Parameters:
target- the call target that has just been enqueued for compilationtier- Which compilation tier is in question.
-
onCompilationDequeued
public void onCompilationDequeued(OptimizedCallTarget target, Object source, CharSequence reason, int tier) Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object aftertargetis removed from the compilation queue.- Parameters:
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 sourceNodeobject. May benull.reason- a textual description of the reason why the compilation was unqueued. May benull.tier- Which compilation tier is in question.
-
onCompilationInvalidated
public void onCompilationInvalidated(OptimizedCallTarget target, Object source, CharSequence reason) Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object whentargetis invalidated.- Parameters:
target- the call target whose compiled code was just invalidatedsource- the source object that caused the compilation to be invalidated. For example the sourceNodeobject. May benull.reason- a textual description of the reason why the compilation was invalidated. May benull.
-
onCompilationStarted
Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object when compilation oftargetis about to start.- Parameters:
target- the call target about to be compiledtask- which compilation task is in question.
-
onCompilationTruffleTierFinished
public void onCompilationTruffleTierFinished(OptimizedCallTarget target, AbstractCompilationTask task, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo graph) Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object when compilation oftargethas completed partial evaluation and is about to perform compilation of the graph produced by partial evaluation.- Parameters:
target- the call target being compiledtask- the compilation taskgraph- access to compiler graph info
-
onCompilationGraalTierFinished
public void onCompilationGraalTierFinished(OptimizedCallTarget target, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo graph) Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object when Graal compilation of a call target completes. Graal compilation occurs betweenOptimizedTruffleRuntimeListener.onCompilationTruffleTierFinished(OptimizedCallTarget, TruffleInlining, TruffleCompilerListener.GraphInfo)and code installation.- Parameters:
target- the call target that was compiledgraph- the graph representingtarget
-
onCompilationSuccess
public void onCompilationSuccess(OptimizedCallTarget target, AbstractCompilationTask task, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo graph, com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo result) Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object when compilation oftargetsucceeds.- Parameters:
target- the call target whose compilation succeededtask- the taskgraph- access to compiler graph inforesult- access to compilation result info
-
onCompilationFailed
public void onCompilationFailed(OptimizedCallTarget target, String reason, boolean bailout, boolean permanentBailout, int tier, Supplier<String> lazyStackTrace) Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object when compilation oftargetfails.- Parameters:
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 oftarget(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 thetargetis compiled again. This value is meaningless ifbailout == false.tier- Which compilation tier is in question.lazyStackTrace- a serialized representation of the exception indicating the reason and stack trace for a compilation failure, ornullin the case of a bailout or when the compiler does not provide a stack trace. SeeTruffleCompilable.serializeException(Throwable).
-
onEngineClosed
Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object an engine using theOptimizedTruffleRuntimewas closed.- Parameters:
runtimeData- the engine's compiler configuration
-