Module openj9.dtfj

Interface Emulator.BranchTraceListener

  • All Known Subinterfaces:
    Emulator.TraceListener
    Enclosing interface:
    Emulator

    public static interface Emulator.BranchTraceListener
    This interface is implemented by users who want to receive branch trace events. It is basically a subset of Emulator.TraceListener that only deals with instructions that involve branching. It is provided as a separate interface for performance reasons so that if a user only wants to trace function entry/exit for instance, they won't get a trace callback for every single instruction.
    • Method Detail

      • traceBranchAndSave

        void traceBranchAndSave​(Emulator em,
                                Emulator.Instruction inst,
                                long returnAddress,
                                long targetAddress)
                         throws IOException
        Trace a branch and save instruction (either BASR, BAS, BAL, BALR or BRAS).
        Parameters:
        returnAddress - the address to return to
        targetAddress - the entry point we are branching to
        Throws:
        IOException
      • traceBranchOnCondition

        void traceBranchOnCondition​(Emulator em,
                                    Emulator.Instruction inst,
                                    boolean branched,
                                    long targetAddress)
                             throws IOException
        Trace a branch on condition instruction.
        Parameters:
        branched - true if the branch was taken
        targetAddress - the address we are branching to
        Throws:
        IOException