Class StatisticsListener

java.lang.Object
com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener
com.oracle.truffle.runtime.debug.StatisticsListener
All Implemented Interfaces:
OptimizedTruffleRuntimeListener

public final class StatisticsListener extends AbstractGraalTruffleRuntimeListener
  • Method Details

    • install

      public static void install(OptimizedTruffleRuntime runtime)
    • createEngineListener

      public static StatisticsListener createEngineListener(OptimizedTruffleRuntime runtime)
    • onCompilationSplit

      public void onCompilationSplit(OptimizedDirectCallNode callNode)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Notifies this object when the target of a Truffle call node is cloned.
      Parameters:
      callNode - the call node whose target has just been cloned
    • onCompilationQueued

      public void onCompilationQueued(OptimizedCallTarget target, int tier)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Notifies this object after target is added to the compilation queue.
      Parameters:
      target - the call target that has just been enqueued for compilation
      tier - Which compilation tier is in question.
    • onCompilationDequeued

      public void onCompilationDequeued(OptimizedCallTarget target, Object source, CharSequence reason, int tier)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Notifies this object after target is removed from the compilation queue.
      Parameters:
      target - the call target that has just been removed from the compilation queue
      source - 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.
    • 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.
    • 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.
    • 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
    • onCompilationGraalTierFinished

      public void onCompilationGraalTierFinished(OptimizedCallTarget target, com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo graph)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Parameters:
      target - the call target that was compiled
      graph - the graph representing target
    • 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
    • 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).
    • onEngineClosed

      public void onEngineClosed(EngineData runtimeData)
      Description copied from interface: OptimizedTruffleRuntimeListener
      Notifies this object an engine using the OptimizedTruffleRuntime was closed.
      Parameters:
      runtimeData - the engine's compiler configuration