Class JFRListener

All Implemented Interfaces:
OptimizedTruffleRuntimeListener

public final class JFRListener extends AbstractGraalTruffleRuntimeListener
Traces Truffle Compilations using Java Flight Recorder events.
  • Method Details

    • install

      public static void install(OptimizedTruffleRuntime runtime)
    • isInstrumented

      public static boolean isInstrumented(jdk.vm.ci.meta.ResolvedJavaMethod method)
    • onCompilationStarted

      public void onCompilationStarted(OptimizedCallTarget target, AbstractCompilationTask task)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Notifies this object when compilation of target is about to start.
      Parameters:
      target - the call target about to be compiled
      task - which compilation task is in question.
    • onCompilationDeoptimized

      public void onCompilationDeoptimized(OptimizedCallTarget target, com.oracle.truffle.api.frame.Frame frame)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Notifies this object when target has 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 deoptimized
      frame -
    • onCompilationTruffleTierFinished

      public void onCompilationTruffleTierFinished(OptimizedCallTarget target, AbstractCompilationTask task, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo graph)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Notifies this object when compilation of target has completed partial evaluation and is about to perform compilation of the graph produced by partial evaluation.
      Parameters:
      target - the call target being compiled
      task - the compilation task
      graph - 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: OptimizedTruffleRuntimeListener
      Notifies this object when compilation of target fails.
      Parameters:
      target - the call target whose compilation failed
      reason - a description of the failure
      bailout - 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.
      lazyStackTrace - a serialized representation of the exception indicating the reason and stack trace for a compilation failure, or null in the case of a bailout or when the compiler does not provide a stack trace. See TruffleCompilable.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: OptimizedTruffleRuntimeListener
      Notifies this object when compilation of target succeeds.
      Parameters:
      target - the call target whose compilation succeeded
      task - the task
      graph - access to compiler graph info
      result - access to compilation result info
    • onCompilationInvalidated

      public void onCompilationInvalidated(OptimizedCallTarget target, Object source, CharSequence reason)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Notifies this object when target is invalidated.
      Parameters:
      target - the call target whose compiled code was just invalidated
      source - 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.