Package ghidra.pcode.emu.jit
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 tomaxPassageInstructions
, 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 toJitPcodeThread.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 Summary
ConstructorsConstructorDescriptionConstruct a default configurationJitConfiguration
(int maxPassageInstructions, int maxPassageOps, int maxPassageStrides, boolean removeUnusedOperations, boolean emitCounters) Creates an instance of aJitConfiguration
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of theemitCounters
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themaxPassageInstructions
record component.int
Returns the value of themaxPassageOps
record component.int
Returns the value of themaxPassageStrides
record component.boolean
Returns the value of theremoveUnusedOperations
record component.final String
toString()
Returns a string representation of this record class.
-
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 aJitConfiguration
record class.- Parameters:
maxPassageInstructions
- the value for themaxPassageInstructions
record componentmaxPassageOps
- the value for themaxPassageOps
record componentmaxPassageStrides
- the value for themaxPassageStrides
record componentremoveUnusedOperations
- the value for theremoveUnusedOperations
record componentemitCounters
- the value for theemitCounters
record component
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
maxPassageInstructions
public int maxPassageInstructions()Returns the value of themaxPassageInstructions
record component.- Returns:
- the value of the
maxPassageInstructions
record component
-
maxPassageOps
public int maxPassageOps()Returns the value of themaxPassageOps
record component.- Returns:
- the value of the
maxPassageOps
record component
-
maxPassageStrides
public int maxPassageStrides()Returns the value of themaxPassageStrides
record component.- Returns:
- the value of the
maxPassageStrides
record component
-
removeUnusedOperations
public boolean removeUnusedOperations()Returns the value of theremoveUnusedOperations
record component.- Returns:
- the value of the
removeUnusedOperations
record component
-
emitCounters
public boolean emitCounters()Returns the value of theemitCounters
record component.- Returns:
- the value of the
emitCounters
record component
-