1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Latency-breakdown tracing (`DTACT_IO_TRACE=1`), shared between the
//! Unix and Windows native reactors — previously an identical copy
//! pasted into both `native.rs` and `windows.rs` (the latter via
//! `include!("windows_primitives.rs")`).
//!
//! `perf` SIGSEGVs on this runtime's stackful coroutines and `strace -T`'s
//! own ptrace overhead dominates the very microsecond-scale timings we're
//! trying to measure (every syscall reads as ~1-2ms regardless of
//! backend). This gives three in-process, monotonic-clock checkpoints per
//! op so the total latency can be split into "submit -> kernel completion
//! observed by io-worker" (`io_uring/IOCP/kernel` round trip) vs "kernel
//! completion -> fiber re-polls and observes it" (wake propagation /
//! scheduler rescheduling), without any external tracer in the loop.
use OnceLock;
pub use io_trace;