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- SeeJitConfiguration.Opt.REMOVE_UNUSED_OPERATIONSemitCounters- SeeJitConfiguration.Opt.EMIT_COUNTERSlogStackTraces- SeeJitConfiguration.Opt.LOG_STACK_TRACES
public record JitConfiguration(int maxPassageInstructions, int maxPassageOps, int maxPassageStrides, boolean removeUnusedOperations, boolean emitCounters, boolean logStackTraces)
extends Record
The configuration for a JIT-accelerated emulator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumFluent specifiers for the boolean options ofJitConfiguration -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a default configurationJitConfiguration(int maxPassageInstructions, int maxPassageOps, int maxPassageStrides, boolean removeUnusedOperations, boolean emitCounters, boolean logStackTraces) Creates an instance of aJitConfigurationrecord class.JitConfiguration(JitConfiguration.Opt... opts) Construct a configuration with default maxes and the given boolean optionsConstruct a configuration with default maxes and the given boolean options -
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.booleanReturns the value of thelogStackTracesrecord component.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
Construct a configuration with default maxes and the given boolean options- Parameters:
opts- the options
-
JitConfiguration
Construct a configuration with default maxes and the given boolean options- Parameters:
opts- the options
-
JitConfiguration
public JitConfiguration(int maxPassageInstructions, int maxPassageOps, int maxPassageStrides, boolean removeUnusedOperations, boolean emitCounters, boolean logStackTraces) 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 componentlogStackTraces- the value for thelogStackTracesrecord 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
-
logStackTraces
public boolean logStackTraces()Returns the value of thelogStackTracesrecord component.- Returns:
- the value of the
logStackTracesrecord component
-