Class JFRListener
java.lang.Object
com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener
com.oracle.truffle.runtime.debug.JFRListener
- All Implemented Interfaces:
OptimizedTruffleRuntimeListener
Traces Truffle Compilations using Java Flight Recorder events.
-
Field Summary
Fields inherited from class AbstractGraalTruffleRuntimeListener
runtime -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinstall(OptimizedTruffleRuntime runtime) static booleanisInstrumented(jdk.vm.ci.meta.ResolvedJavaMethod method) 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.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.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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OptimizedTruffleRuntimeListener
onCompilationDequeued, onCompilationFailed, onCompilationFailed, onCompilationGraalTierFinished, onCompilationQueued, onCompilationSplit, onCompilationSplitFailed, onCompilationStarted, onCompilationStarted, onCompilationSuccess, onCompilationSuccess, onCompilationTruffleTierFinished, onEngineClosed, onShutdown
-
Method Details
-
install
-
isInstrumented
public static boolean isInstrumented(jdk.vm.ci.meta.ResolvedJavaMethod method) -
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
-
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).
-
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.
-