Package ghidra.trace.model.time.schedule
Interface Scheduler
public interface Scheduler
A generator of an emulator's thread schedule
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe result of running a machinestatic interface -
Method Summary
Modifier and TypeMethodDescriptionGet the next step to schedulestatic ScheduleroneThread(TraceThread thread) Create a scheduler that allocates all slices to a single threaddefault Scheduler.RunResultrun(Trace trace, TraceThread eventThread, PcodeMachine<?> machine, TaskMonitor monitor) Run a machine according to the given schedule until it is interrupted
-
Method Details
-
oneThread
Create a scheduler that allocates all slices to a single thread- Parameters:
thread- the thread to schedule- Returns:
- the scheduler
-
nextSlice
Get the next step to schedule- Parameters:
trace- the trace being emulated- Returns:
- the thread and (instruction-level) tick count
-
run
default Scheduler.RunResult run(Trace trace, TraceThread eventThread, PcodeMachine<?> machine, TaskMonitor monitor) Run a machine according to the given schedule until it is interruptedThis method will drop p-code steps from injections, including those from execution breakpoints. The goal is to ensure that the returned schedule can be used to recover the same state on a machine without injections. Unfortunately, injections which modify the machine state, other than unique variables, will defeat that goal.
- Parameters:
trace- the trace whose threads to scheduleeventThread- the first thread to schedule if the scheduler doesn't specifymachine- the machine to runmonitor- a monitor for cancellation- Returns:
- the result of execution
-