capture_starvation_witness

Function capture_starvation_witness 

Source
pub fn capture_starvation_witness(result: &VmResult) -> Option<f64>
Expand description

Witnessed-starvation evidence for capture-bearing assertions: the host dilation D that PROVES the run was contended enough to explain missing/degraded periodic captures, or None on a quiet (or unwitnessed) host.

The periodic capture chain is readiness-gated (KASLR publish + accessor-init worker) and its boundaries are wall-anchored inside the workload window; under heavy host saturation the cold-cache accessor build alone can outlast a short workload, so every boundary defers past run end and periodic_fired == 0 with zero real captures — an ENVIRONMENTAL outcome, not a capture-pipeline regression (observed across the periodic/freeze test family on saturated 96-CPU CI runners; the same cells pass idle). Assertions that require captures consult this first and convert their failure into a host-side SKIP (post_vm_skip) when starvation is proven, mirroring the tri-state latency gates: a quiet-host miss still FAILS (the regression the assertion exists to catch).

Witness preference: Body-phase dilation (the capture boundaries live inside the workload window), falling back to the whole-run schedstat D. The 1.5 bar follows PERF_ISOLATION_D_MAX’s derivation (worst measured-quiet D ≈ 1.21; > 1.5 is unambiguous external contention). None (no witness sampled) is NOT proof — callers must fail in that case; absence of evidence cannot launder a regression.