Expand description
Runtime and stack-pool diagnostics.
Diagnostic records are observations with private fields, not scheduler inputs.
ⓘ
let snapshot = vthread::diagnostics::RuntimeSnapshot { active: 0 };Extensible diagnostic enums require a fallback arm downstream.
ⓘ
use vthread::diagnostics::CarrierStatus;
fn exhaustive(status: CarrierStatus) { match status {
CarrierStatus::Idle | CarrierStatus::Running | CarrierStatus::Stopped | CarrierStatus::Failed => ()
} }Modules§
- evidence
- Opt-in, bounded runtime evidence for qualification and exact replay.
- qualification
- Explicit generation-bound wake handles for runtime qualification.
Structs§
- Carrier
Id - Stable carrier index within one runtime.
- Carrier
Snapshot - Owner-local scheduler counters published by a carrier.
- Channel
Counters - Counts for carrier-initiated operations after their initial checkpoint.
Storedcounts permit writes, including rewrites of an already stored permit; it is not a count of distinct future resumptions. Closure broadcasts are included. - Dump
Report - Accounting for one bounded dump write.
- Handoff
Duration - Fixed-size elapsed-time distribution. Counts are cumulative; total nanoseconds
saturate at
u64::MAX. Observations are diagnostic, not headline latency data. - Handoff
Profile - Cumulative evidence attributed to the executing owner carrier. Native callers without a mounted carrier route are not counted. No new shared counter atomics or per-observation allocations are used. Active snapshots can lag; shutdown publishes final totals. Enabled clocks, TLS accesses and larger snapshots affect scheduling, so this feature cannot supply uninstrumented performance claims.
- Lifecycle
Profile - Cumulative task lifecycle work observed by one runtime.
- Mutex
Counters - Carrier-initiated mutex operations after the entry checkpoint.
try_lockcalls and producers without a mounted carrier route are not counted. Stored grants include offers to inactive generations, not unique future acquisitions. - Runtime
Id - Process-unique identity; it is not a persistent identifier across process restarts.
- Runtime
Snapshot - Weakly consistent diagnostic view assembled from independently observed components.
- Runtime
Stats - Cumulative scheduler counters.
- Scheduler
Profile - Cumulative activity for one carrier, available with
scheduler-profiling. - ScopeId
- Owned root or supervisor identity within one runtime.
Pair it with
RuntimeIdfor process-wide correlation. - Service
Snapshot - Bounded I/O and delegated-work activity for operator diagnostics.
- Stack
Snapshot - Bounded stack-cache counters.
- Stall
Snapshot - Most recent automatic scope recovery, retained after its task records are reclaimed.
- TaskId
- Stable identity assigned by one runtime.
- Task
Snapshot - Immutable operator-facing task diagnostics.
- Thread
Failure - One bounded component failure; ordinary task panics are reported by their handles.
- Thread
Failures - Bounded retained terminal failures; further failures contribute to a counter.
Enums§
- Carrier
Status - Health of one persistent carrier.
- Channel
Direction - Endpoint direction; notification counters describe the waiter being notified.
- Failure
Phase - Boundary at which an owned thread failure was observed.
- Handoff
Stage - A measured region, not a disjoint CPU-time category. Nested regions overlap; elapsed time includes preemption and must not be summed as CPU consumption.
- Shutdown
Phase - Furthest shutdown stage reached; stages never move backward between concurrent callers.
- Suspension
Reason - A reason a task voluntarily returned to its carrier.
- Task
Failure - Why a carrier reclaimed a task without normal completion.
- Task
Status - Current scheduler-visible task state.
- Thread
Component - Which owned runtime component failed.
- Wake
Reason - The winner that made one parked task runnable again.
Constants§
- HANDOFF_
DURATION_ BOUNDS_ NS - Inclusive duration histogram bounds in nanoseconds; the last bin includes all larger observations. Clock overhead is not subtracted.