pub struct Stats {
pub steps: u64,
pub lifts: u64,
pub resolves: u64,
pub native_bodies: u64,
pub absorbed: u64,
pub fetch_bytes: u64,
pub fetch: Duration,
pub decode_lift: Duration,
pub optimize: Duration,
pub forwarded_loads: u64,
pub removed_stores: u64,
}Expand description
Counters and timings for one machine’s run.
Fields§
§steps: u64P-code operations retired.
lifts: u64Times an address had to be lifted: a translation-cache miss.
resolves: u64Times execution left a block and the target was already lifted: a translation-cache hit at the VM level.
Both counters only see transitions that reach the VM. Most control flow
never does: a branch inside the lifted graph is a direct block
reference the interpreter follows without consulting any address index,
so a steady-state loop performs no translation-cache lookups at all.
Read a low resolves next to a high steps as “control flow is
already resolved”, not as “the cache is missing”.
native_bodies: u64Block bodies executed by an installed BlockExecutor
rather than interpreted.
absorbed: u64Blocks folded into a predecessor as a guest basic block was discovered, each one a unit the machine no longer enters and leaves separately.
fetch_bytes: u64Instruction bytes read from guest memory.
fetch: DurationTime spent reading instruction bytes.
decode_lift: DurationTime spent decoding and lowering to QCode.
optimize: DurationTime spent in the block-local cleanup round.
forwarded_loads: u64Loads forwarded to their stored value by the cleanup round.
removed_stores: u64Stores removed by the cleanup round.
Implementations§
Source§impl Stats
impl Stats
Sourcepub fn translation(&self) -> Duration
pub fn translation(&self) -> Duration
Total time in the fetch and translation phases.
Sourcepub fn execute(&self, elapsed: Duration) -> Duration
pub fn execute(&self, elapsed: Duration) -> Duration
The share of elapsed spent executing rather than translating.
Derived, so it also absorbs whatever the VM spends on its own bookkeeping; it is an upper bound on interpretation cost, not an exact measure of it.