Chapter 11. Driver Tracing and Diagnosability

Software tracing consists of embedding trace message statements in the driver code to record its behavior at various points. The messages can then be viewed in real time—while the driver is in operation—or retrieved later from log files. Tracing is typically used to determine the location and cause of bugs, but it can also be used for such tasks as profiling how frequently different routines are called.

Driver tracing is usually based on Event Tracing for Windows (ETW), a kernel-level facility that logs trace messages for both kernel-mode and user-mode processes. Because ETW can be somewhat complicated to use, most driver developers use WPP, which simplifies and enhances the process of instrumenting ...

Get Developing Drivers with the Windows® Driver Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.