Introduction
This MR adds ETW support for the driver and the app. It controls the output to the driver with the macro ENABLE_ETW_TRACING
and to the app with ENABLE_ETW_TRACING_APP
.
To install the manifest for the driver you just need to enter on an administrator command and type wevtutil.exe im .\wperf-driver-etw-manifest.xml
make sure to uninstall first with um
in case you already have a manifest installed. In order to have it working the manifest must point to a full path, so to install the app manifest you need to point to the resources in your local machine with wevtutil.exe /resourceFilePath:WPERF_EXE_FULL_PATH /messageFilePath:WPERF_EXE_FULL_PATH im .\wperf-etw-manifest.xml
.
When you install the manifest for the application you might get the following warning
**** Warning: Publisher WindowsPerf App resources could not be found or are not accessible
to the EventLog service account (NT SERVICE\EventLog).
This does not interfere but to solve this you need to add the NT SERVICE\EventLog
user to the access list of wperf.exe
before installing.
To actually see the output you need to open the WPR and select a custom profile either wperf-wpr-profile.wprp
or wperf-app-wpr-profile.wprp
if you want to record the driver or app, or both ETW traces. Start recording and use WindowsPerf normaly. After you generate the .etl
file you can open it on WPA.
If you open it directly on WPA you will see a list of events with provider either WindowsPerf App
or WindowsPerf Driver
. If you want to actually graph this you need to build the wpa-plugin-etl
project from https://gitlab.com/Linaro/WindowsPerf/wpa-plugin-etl. Once you build the plugin go to the directory with the .dll
and type wpa -addsearchdir "$(pwd)"
. Make sure that the plugin was loaded going under Help->About and check to see if the WindowsPerf WPA Plugin ETL
is listed.
Open your .etl
trace file and select the plugin to use it. If you also selected xperf plugin
to read the file and a single session
you might get something similar to this
For now the ETW trace is just added to counting on both the driver and the app. You can disable both, just one or have all enabled like the sample above.
This MR was lightly inspired on 3d68bbd5
In this patch:
-
[wperf, wperf-driver] Update WPR profile description
-
[wperf] Include ETW on the app
-
[wperf-driver] Create a new macro, ENABLE_ETW_TRACING to control ETW output inside the driver
-
[wperf-driver] Include basic core PMU ETW support
-
[wperf-driver] Include WPR profile
-
[wperf-driver] Including basic structure for ETW