Skip to content
WindowsDeep Dive July 11, 2026 4 min read

Event Tracing for Windows (ETW): The Kernel's Built-In Instrumentation System

The high-performance, always-available tracing infrastructure built directly into the Windows kernel, and why it's the foundation nearly every serious Windows diagnostic and monitoring tool is actually built on.

Event Tracing for Windows (ETW) is a kernel-level logging and tracing infrastructure built directly into Windows, designed specifically to record detailed system and application events with low enough overhead to run continuously in production — a meaningfully different design goal from ad-hoc debugging tools that are only acceptable to run temporarily while actively investigating a specific problem.

Why a dedicated tracing infrastructure, rather than ordinary logging

Ordinary application logging (writing formatted text to a file) has real per-event overhead — string formatting, disk I/O, potential lock contention if multiple threads log concurrently — that makes it impractical for the volume and frequency of events genuinely useful for deep performance or behavior diagnosis (individual system calls, context switches, page faults, ten thousand events per second or more from a busy system). ETW is architected specifically to keep this overhead low enough that comprehensive, high-frequency tracing is viable continuously in production, not just as a temporary, invasive debugging measure.

The provider/session/consumer architecture

ETW separates three roles cleanly: providers are the components (kernel subsystems, drivers, or user-mode applications) that actually generate events; sessions are the specific, independently configurable tracing sessions that collect events from one or more providers into a buffer or log file; and consumers are the tools that read and interpret the collected event data. This separation is what lets multiple different tools trace the same system simultaneously without interfering with each other — a performance profiler and a security monitoring tool can each run their own independent ETW session, both drawing on the same underlying provider-generated events, without needing to coordinate directly with each other at all.

Low overhead through the buffering and deferred-processing design

ETW’s low overhead comes largely from how it handles the actual event-writing path: providers write structured, typically binary event records into per-processor buffers with minimal synchronization overhead, and the more expensive work — actually formatting, filtering, or persisting the data somewhere durable — happens later, asynchronously, outside the hot path of whatever operation originally triggered the event. This deferred-processing design is a similar underlying philosophy to macOS’s unified logging system, arrived at independently for the same fundamental reason: the expensive part of logging shouldn’t happen synchronously in the middle of whatever operation is actually being traced.

What’s already instrumented, without writing any tracing code yourself

A substantial amount of the Windows kernel and core subsystems already ship with built-in ETW providers — process creation and termination, thread scheduling, disk I/O, network activity, page faults, registry access, and a great deal more are already instrumented and available to trace on any Windows system, without needing to add any instrumentation yourself. This is why tools like Windows Performance Recorder/Analyzer can produce genuinely deep, systemwide performance traces (showing exactly which process caused a specific disk stall, or which thread was scheduled when) without requiring the traced applications to have been specially built with tracing support — the kernel’s own already-present ETW providers supply this detail directly.

Where this shows up in familiar tools

Sysinternals’ Process Monitor is, under the hood, an ETW consumer — its real-time file system, registry, and process activity monitoring is built directly on kernel ETW providers rather than some separate, custom instrumentation mechanism. Windows Performance Recorder, PerfView, and a substantial portion of Windows’s own built-in performance and reliability monitoring similarly consume ETW data as their actual underlying data source, rather than each tool implementing its own independent low-level instrumentation.

Writing your own provider for application-level tracing

Applications can define and emit their own ETW events, which is genuinely valuable for production diagnostics specifically because of ETW’s low overhead — instrumenting an application’s key operations with custom ETW events, then only enabling collection for a specific session when actually diagnosing an issue, gives detailed, structured diagnostic capability that can remain present in shipped production code without materially affecting performance during normal, non-traced operation, since a provider with no active session listening does essentially no work at all.

Why this architecture matters beyond just Windows internals

ETW’s fundamental design bet — that comprehensive, structured, low-overhead tracing is worth building as first-class kernel infrastructure rather than leaving to ad-hoc, per-tool instrumentation — has paid off specifically because it lets entirely different diagnostic tools, built by different teams for different purposes, draw on the exact same underlying event stream rather than each needing separate, redundant instrumentation. A performance issue and a security investigation can, in principle, draw on overlapping ETW data from the same time window, which is a meaningfully more coherent diagnostic story than maintaining entirely separate, tool-specific logging systems for each purpose.