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.