Class PrintInstructionTracer.Builder

java.lang.Object
com.oracle.truffle.api.bytecode.debug.PrintInstructionTracer.Builder
Enclosing class:
PrintInstructionTracer

public static final class PrintInstructionTracer.Builder extends Object
Builder for PrintInstructionTracer instances.

Call filter(Predicate) to restrict tracing to selected BytecodeNodes, then build() to create the tracer.

Since:
25.1
  • Method Details

    • filter

      public PrintInstructionTracer.Builder filter(Predicate<BytecodeNode> filterClause)
      Sets an optional filter that decides which BytecodeNodes should be traced.

      If the predicate returns false for a given node, instructions executed in that node are not printed.

      Parameters:
      filterClause - predicate that returns true if tracing should be enabled for the given node
      Returns:
      this builder
      Since:
      25.1
    • build

      public PrintInstructionTracer build()
      Creates a new PrintInstructionTracer instance using the configured output sink and optional filter.
      Returns:
      a new tracer
      Since:
      25.1