Class StackTraceEntry

java.lang.Object
com.oracle.truffle.tools.profiler.StackTraceEntry

public final class StackTraceEntry extends Object
An entry in a stack trace, as returned by CPUSampler.takeSample(). Each entry represents a single element on the stack that is currently being executed. Stack trace entries may represent a root, expression or statement execution. The frame at the top of the stack represents the execution point at which the stack trace was generated.
Since:
19.0
See Also:
  • Method Details

    • getTier

      public int getTier()
      Returns:
      with which tier was this entry compiled. Note: Tier 0 represents the interpreter.
      Since:
      21.3.0
    • isCompilationRoot

      public boolean isCompilationRoot()
      Returns:
      true if the entry was a compilation root, false if it was inlined. Interpreted enries are implicitly considered compilation roots.
      Since:
      21.3.0
    • isCompiled

      @Deprecated public boolean isCompiled()
      Deprecated.
      Returns true if this stack entry was executed in compiled mode at the time when the stack trace was captured, else false.
      Since:
      19.0
    • isInterpreted

      @Deprecated public boolean isInterpreted()
      Deprecated.
      Returns true if this stack entry was executed in interpreted mode at the time when the stack trace was captured, else false.
      Since:
      19.0
    • isInlined

      public boolean isInlined()
      Returns true if this stack entry was executed in compiled mode and was inlined in a parent stack entry at the time when the stack trace was captured, else false.
      Since:
      19.0
    • getSourceSection

      public com.oracle.truffle.api.source.SourceSection getSourceSection()
      Returns the source section of the stack trace entry.
      Since:
      19.0
    • getRootName

      public String getRootName()
      Returns the name of the root node. For elements that don't represent a guest language root like statements and expressions this returns the name of the enclosing root.
      Since:
      19.0
      See Also:
      • RootNode.getName()
    • getTags

      public Set<Class<?>> getTags()
      Returns a set tags a stack location marked with. Common tags are root, statement and expression. Whether statement or expression stack trace entries appear depends on the configured filter. Never null.
      Since:
      19.0
      See Also:
      • Instrumenter.queryTags(Node)
    • toStackTraceElement

      public StackTraceElement toStackTraceElement()
      Converts the stack trace entry to a Java stack trace element. No guarantees are provided about the format of the stack trace element. The format of the stack trace element may change without notice.
      Since:
      19.0
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Since:
      19.0
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Since:
      19.0
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Since:
      19.0