Tracelog (Tracelog.exe) 是在命令提示符窗口中运行的事件跟踪控制器。 本部分介绍 Tracelog、说明其命令语法,并提供实际示例供其使用。
安装 WDK、Visual Studio 和适用于桌面应用的 Windows SDK 时,包括 Tracelog (Tracelog.exe)。 有关下载工具包的信息,请参阅 Windows 硬件下载。
安装后,TraceLog.exe 将位于该版本的工具包的 bin 目录中。 选择所需的处理器。 例如 x64 版本: C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64>
可以使用 Tracelog 执行的作
可以在命令提示符窗口中将 Tracelog 用作事件跟踪控制器。
Note To control a trace session you must be a member of the Performance Log Users group or the Administrators group on the computer (Run as administrator).
Tracelog 功能包括:
Starts and stops trace sessions, including private trace sessions, NT Kernel Logger trace sessions, and Global Logger trace sessions
配置和更改跟踪会话的属性
Enables and disables trace providers
刷新跟踪会话缓冲区
列出正在运行的(实时)跟踪会话
列出 已注册的跟踪提供程序
测量延迟过程调用(DPC)和中断服务例程(ISR)中花费的时间
Tracelog 生成一个事件跟踪日志 (.etl) 文件,该文件包含提供程序在跟踪会话期间生成的跟踪消息。 消息以二进制格式存储在文件中。 To display the trace messages in a readable format, use TraceView or Tracefmt.
Tracelog 控制内核模式和专用(用户模式)跟踪会话,以及 NT 内核记录器跟踪会话 和 全局记录器跟踪会话等特殊会话。
Tracelog 在 Windows 7 及更高版本的 Windows 上运行。
Many of the features of Tracelog are also available in TraceView, a tool included in the Windows Driver Kit (WDK) that has a graphical user interface in addition to a command-line interface.