Expand description
Rust bindings to the Windows ipt.sys driver.
ipt.sys is the Windows kernel driver that manages Intel Processor Trace (Intel PT).
There is no public Microsoft header or documentation for this interface; this crate provides
its own typed request/response layouts for it.
Ipt::open the device, then call one Ipt method per driver operation (e.g.
Ipt::start_process_trace, Ipt::get_trace_buffer). Each method builds its own request,
issues the DeviceIoControl call and decodes the response — no manual buffer/IOCTL plumbing
needed.
§Platform
This crate targets x86_64 on Windows only.
§Stability
ipt.sys is an internal OS component, not a supported public API. Its shape can change between
Windows builds without notice. Treat this crate as best effort, only Microsoft & friends know
how stable this really is.
Structs§
- Address
Filter Range Response - Response to
QueryThreadAddressFilterRange. - Ipt
- Handle to the
ipt.sysdevice, and the entry point for every operation in this crate. - IptOption
- Options to be supplied by the caller when starting a trace
(
StartProcessTrace/StartProcessTraceEx), echoed back byQueryProcessTraceConfiguration, and the same layout is written to/read from the registry bySetSystemWideTracingOption/SetPerImageTracingOption. - Trace
Buffer - Output buffer for
Ipt::get_trace_buffersized to hold aGetTraceBufferresponse. Iterate the per-thread records it holds withTraceBuffer::iter. - Trace
Buffer Iter - Iterator over a
TraceBuffer’s per-thread trace records, returned byTraceBuffer::iter. - Trace
Record Header - Per-thread record header inside a
GetTraceBufferresponse, immediately followed bypayload_lengthbytes of raw Intel PT packets for that thread.
Enums§
- Address
Filter Mode - One IP-filtering range’s mode, as used by the
ConfigureThreadAddressFilterRangerequest’smode. - Match
Settings - Which identity the driver groups auto-started traces under.
- Ring
Filter - Which privilege rings are traced (
IA32_RTIT_CTL.OS/.User). Two parallel encodings exist depending on which API surface consumes the option; using the wrong half for the wrong opcode is rejected by the driver. - Timing
Mode - Which extra timing packets are generated beyond the default TSC packets.
- Trace
Mode - Where captured trace data is written.
Constants§
- NUM_
TRIES_ UNLIMITED - Sentinel for
num_triesmeaning “unlimited auto-start attempts”.