Reading time: | 15 min |
Last updated: | 7 Nov 2023 |
Reading time: |
15 min |
Last updated: |
7 Nov 2023 |
This guide is intended to get you up and running with this tool quickly with the most common settings. For a thorough review of all options, refer to the official documentation.
WindowsPerf is an open-source command line tool for performance analysis on Windows on Arm devices.
WindowsPerf consists of a kernel-mode driver and a user-space command-line tool. The command-line tool is modeled after the Linux perf
command.
WindowsPerf includes a counting model for counting events such as cycles, instructions, and cache events and a sampling model to understand how frequently events occur.
WindowsPerf cannot be used on virtual machines, such as cloud instances.
WindowsPerf relies on dll
files installed with Visual Studio (Community Edition or higher) and (optionally) installers from the Windows Driver Kit extension.
Download the Windows Driver Kit (WDK) explains the WDK installation process.
See also the Visual Studio for Windows on Arm install guide .
The latest release package windowsperf-bin-<version>.zip
can be downloaded from the Linaro GitLab repository:
https://gitlab.com/Linaro/WindowsPerf/windowsperf/-/releases
To download directly from command prompt, use:
mkdir windowsperf-bin-3.2.1
cd windowsperf-bin-3.2.1
curl https://gitlab.com/api/v4/projects/40381146/packages/generic/windowsperf/3.2.1/windowsperf-bin-3.2.1.zip --output windowsperf-bin-3.2.1.zip
Unzip the package:
tar -xmf windowsperf-bin-3.2.1.zip
You can install the kernel driver using either the Visual Studio devcon utility or the supplied installer .
You must install the driver as Administrator
.
Open a Windows Command Prompt
terminal with Run as administrator
enabled.
Navigate to the windowsperf-bin-<version>
directory.
cd windowsperf-bin-3.2.1
Navigate into the wperf-driver
folder, and use devcon
to install the driver:
cd wperf-driver
devcon install wperf-driver.inf Root\WPERFDRIVER
You will see output similar to:
Device node created. Install is complete when drivers are installed...
Updating drivers for Root\WPERFDRIVER from <path>\wperf-driver.inf.
Drivers installed successfully.
Copy the wperf-devgen.exe
executable to the wperf-driver
folder.
copy wperf-devgen.exe wperf-driver\
Navigate to the wperf-driver
folder and run the installer:
cd wperf-driver
wperf-devgen install
You will see output similar to:
Executing command: install.
Install requested.
Waiting for device creation...
Device installed successfully.
Trying to install driver...
Success installing driver.
You can check everything is working by running the wperf
executable.
Once the above driver is installed, you can use wperf
without Administrator
privileges.
For example:
cd ..
wperf --version
You should see output similar to:
Component Version GitVer
========= ======= ======
wperf 3.2.1 c831cfc2
wperf-driver 3.2.1 c831cfc2
You can uninstall (aka “remove”) the kernel driver using either the Visual Studio devcon utility or the supplied installer .
You must uninstall the driver as Administrator
.
Below command removes the device from the device tree and deletes the device stack for the device. As a result of these actions, child devices are removed from the device tree and the drivers that support the device are unloaded. See DevCon Remove article for more details.
devcon remove wperf-driver.inf Root\WPERFDRIVER
You should see output similar to:
ROOT\SYSTEM\0001 : Removed
1 device(s) were removed.
wperf-devgen uninstall
You should see output similar to:
Executing command: uninstall.
Uninstall requested.
Waiting for device creation...
Device uninstalled successfully.
Trying to remove driver <path>\wperf-driver.inf.
Driver removed successfully.
Announcing WindowsPerf: Open-source performance analysis tool for Windows on Arm
How would you rate the overall quality of this tool quick-install guide?
What is the primary reason for your feedback ?
Thank you. We're grateful for your feedback on how to improve this tool quick-install guide.