Record Class JitConfiguration

java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.JitConfiguration
Record Components:
maxPassageInstructions - The (soft) maximum number of instructions to decode per translated passage. A passage can consist of several control-flow connected basic blocks. The decoder will decode contiguous streams of instructions with fall-through (called strides), adding seeds where it encounters branches. It will not stop mid-stride, but checks the instruction count before proceeding to another seed. If it exceeds the max, it stops.
maxPassageOps - The (soft) maximum number of p-code ops. This is similar to maxPassageInstructions, but limits the number of p-code ops generated. NOTE: The JVM limits each method to 65,535 total bytes of bytecode. If this limit is exceeded, the ASM library throws an exception. When this happens, the compiler will retry the whole process, but with this configuration parameter halved.
maxPassageStrides - The maximum number of strides to include.
removeUnusedOperations - Some p-code ops produce outputs that are never used later. One common case is flags computed from arithmetic operations. If this option is enabled, the JIT compiler will remove those p-code ops.
emitCounters - Causes the translator to emit a call to JitPcodeThread.count(int, int) at the start of each basic block.

public record JitConfiguration(int maxPassageInstructions, int maxPassageOps, int maxPassageStrides, boolean removeUnusedOperations, boolean emitCounters) extends Record
The configuration for a JIT-accelerated emulator.
  • Constructor Details

    • JitConfiguration

      public JitConfiguration()
      Construct a default configuration
    • JitConfiguration

      public JitConfiguration(int maxPassageInstructions, int maxPassageOps, int maxPassageStrides, boolean removeUnusedOperations, boolean emitCounters)
      Creates an instance of a JitConfiguration record class.
      Parameters:
      maxPassageInstructions - the value for the maxPassageInstructions record component
      maxPassageOps - the value for the maxPassageOps record component
      maxPassageStrides - the value for the maxPassageStrides record component
      removeUnusedOperations - the value for the removeUnusedOperations record component
      emitCounters - the value for the emitCounters record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxPassageInstructions

      public int maxPassageInstructions()
      Returns the value of the maxPassageInstructions record component.
      Returns:
      the value of the maxPassageInstructions record component
    • maxPassageOps

      public int maxPassageOps()
      Returns the value of the maxPassageOps record component.
      Returns:
      the value of the maxPassageOps record component
    • maxPassageStrides

      public int maxPassageStrides()
      Returns the value of the maxPassageStrides record component.
      Returns:
      the value of the maxPassageStrides record component
    • removeUnusedOperations

      public boolean removeUnusedOperations()
      Returns the value of the removeUnusedOperations record component.
      Returns:
      the value of the removeUnusedOperations record component
    • emitCounters

      public boolean emitCounters()
      Returns the value of the emitCounters record component.
      Returns:
      the value of the emitCounters record component