pub struct TraceOptions {Show 14 fields
pub instruction_fetches: bool,
pub physical_addresses: bool,
pub ordering: Ordering,
pub follow_handlers: bool,
pub block_interrupts: bool,
pub interrupt_pacing: Option<u64>,
pub macsim: bool,
pub macsim_include_faulted: bool,
pub macsim_sideband: bool,
pub extended: bool,
pub gzip_level: u32,
pub zstd_level: i32,
pub max_instructions: Option<u64>,
pub trap_flag_guard: bool,
}Expand description
Everything you can switch on and off.
Fields§
§instruction_fetches: boolRecord instruction-fetch accesses in the extended trace.
physical_addresses: boolTranslate every access to a guest-physical address.
ordering: OrderingHow vCPUs are ordered against each other.
follow_handlers: boolPlant breakpoints on interrupt, exception and system-call entry
points so that handlers are traced too (see crate::events).
Without this, every handler runs untraced.
block_interrupts: boolAsk KVM not to inject interrupts while tracing
(KVM_GUESTDBG_BLOCKIRQ, Linux ≥ 5.15). Interrupts are held
pending, not lost: they are delivered when tracing stops, or in the
windows opened by interrupt_pacing.
interrupt_pacing: Option<u64>With block_interrupts: every this many
instructions, let pending interrupts in for
PACING_WINDOW instructions. The handlers they start are traced
like any other code.
Why: a traced guest runs one to two orders of magnitude slower than normal, but its timers still run on host time. Delivered as they fall due, timer interrupts arrive faster than the slowed guest can service them and an OS kernel livelocks in its interrupt handlers. Pacing bounds the interrupt rate in guest instructions.
macsim: boolWrite MacSim .raw files.
macsim_include_faulted: boolAlso write instructions that faulted to the MacSim stream (Pin reports them too, since it instruments before execution).
macsim_sideband: boolWith macsim: also write the sideband
trace_<vcpu>.side (crate::side): CS, CPL, CR3, physical
addresses, instruction bytes and every access, one entry per
MacSim record.
extended: boolWrite extended .kvt files.
gzip_level: u32gzip level for MacSim files (1 = fastest).
zstd_level: i32zstd level for .kvt files.
max_instructions: Option<u64>Stop after this many instructions in total.
trap_flag_guard: boolAfter tracing stops, keep catching stale single-step traps (see
KvmTracer::disable).