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 aJitConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theemitCountersrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxPassageInstructionsrecord component.intReturns the value of themaxPassageOpsrecord component.intReturns the value of themaxPassageStridesrecord component.booleanReturns the value of theremoveUnusedOperationsrecord component.final StringtoString()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 aJitConfigurationrecord class.- Parameters:
maxPassageInstructions- the value for themaxPassageInstructionsrecord componentmaxPassageOps- the value for themaxPassageOpsrecord componentmaxPassageStrides- the value for themaxPassageStridesrecord componentremoveUnusedOperations- the value for theremoveUnusedOperationsrecord componentemitCounters- the value for theemitCountersrecord 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 themaxPassageInstructionsrecord component.- Returns:
- the value of the
maxPassageInstructionsrecord component
-
maxPassageOps
public int maxPassageOps()Returns the value of themaxPassageOpsrecord component.- Returns:
- the value of the
maxPassageOpsrecord component
-
maxPassageStrides
public int maxPassageStrides()Returns the value of themaxPassageStridesrecord component.- Returns:
- the value of the
maxPassageStridesrecord component
-
removeUnusedOperations
public boolean removeUnusedOperations()Returns the value of theremoveUnusedOperationsrecord component.- Returns:
- the value of the
removeUnusedOperationsrecord component
-
emitCounters
public boolean emitCounters()Returns the value of theemitCountersrecord component.- Returns:
- the value of the
emitCountersrecord component
-