Interface TraceThread

All Superinterfaces:
TraceObjectInterface, TraceUniqueObject
All Known Implementing Classes:
DBTraceThread

public interface TraceThread extends TraceUniqueObject, TraceObjectInterface
A thread in a trace

This object must be associated with a suitable TraceExecutionStateful. In most cases, the object should just implement it.

  • Field Details

    • KEY_TID

      static final String KEY_TID
      The key that gives the TID, as assigned by the target's platform
      See Also:
  • Method Details

    • getTrace

      Trace getTrace()
      Get the trace containing this thread
      Returns:
      the trace
    • getKey

      long getKey()
      Get a key identifying this thread, unique among all threads in this trace for all time
      Returns:
      the key
    • getPath

      String getPath()
      Get the "full name" of this thread
      Returns:
      the path
    • getName

      String getName(long snap)
      Get the "short name" of this thread
      Parameters:
      snap - the snap
      Returns:
      the name
    • setName

      void setName(Lifespan lifespan, String name)
      Set the "short name" of this thread
      Parameters:
      lifespan - the span of time
      name - the name
    • setName

      void setName(long snap, String name)
      Set the "short name" of this thread
      Parameters:
      snap - the starting snap
      name - the name
    • setComment

      void setComment(long snap, String comment)
      Set a comment on this thread
      Parameters:
      snap - the snap
      comment - the comment, possibly null
    • getComment

      String getComment(long snap)
      Get the comment on this thread
      Parameters:
      snap - the snap
      Returns:
      the comment, possibly null
    • getRegisters

      default List<Register> getRegisters()
      A convenience to obtain the registers from the containing trace's base language
      Returns:
      the list of registers
    • delete

      void delete()
      Delete this thread from the trace
    • remove

      void remove(long snap)
      Remove this thread from the given snapshot on
      Parameters:
      snap - the snapshot key
    • isValid

      boolean isValid(long snap)
      Check if the thread is valid at the given snapshot

      In object mode, a thread's life may be disjoint, so checking if the snap occurs between creation and destruction is not quite sufficient. This method encapsulates validity. In object mode, it checks that the thread object has a canonical parent at the given snapshot. In table mode, it checks that the lifespan contains the snap.

      Parameters:
      snap - the snapshot key
      Returns:
      true if valid, false if not
    • isAlive

      boolean isAlive(Lifespan span)
      Check if the module is alive for any of the given span
      Parameters:
      span - the span
      Returns:
      true if its life intersects the span