Class TraceCompilationListener
java.lang.Object
com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener
com.oracle.truffle.runtime.debug.TraceCompilationListener
- All Implemented Interfaces:
OptimizedTruffleRuntimeListener
Traces AST-level compilation events with a detailed log message sent to the Truffle log stream
for each event.
-
Field Summary
FieldsFields inherited from class com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener
runtime -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinstall(OptimizedTruffleRuntime runtime) voidonCompilationDeoptimized(OptimizedCallTarget target, com.oracle.truffle.api.frame.Frame frame) Notifies this object whentargethas just deoptimized and is now executing in the Truffle interpreter instead of executing compiled code.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.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.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oracle.truffle.runtime.OptimizedTruffleRuntimeListener
onCompilationFailed, onCompilationFailed, onCompilationGraalTierFinished, onCompilationSplit, onCompilationSplitFailed, onCompilationStarted, onCompilationStarted, onCompilationSuccess, onCompilationSuccess, onCompilationTruffleTierFinished, onEngineClosed, onShutdown
-
Field Details
-
TIER_FORMAT
- See Also:
-
COUNT_THRESHOLD_FORMAT
- See Also:
-
-
Method Details
-
install
-
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.
-
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).
-
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.
-
onCompilationDeoptimized
public void onCompilationDeoptimized(OptimizedCallTarget target, com.oracle.truffle.api.frame.Frame frame) Description copied from interface:OptimizedTruffleRuntimeListenerNotifies this object whentargethas just deoptimized and is now executing in the Truffle interpreter instead of executing compiled code.- Parameters:
target- the call target whose compiled code was just deoptimizedframe-
-
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
-
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
-
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.
-