Reading time: | 15 min |
Last updated: | 22 Oct 2024 |
Reading time: |
15 min |
Last updated: |
22 Oct 2024 |
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 a Linux Perf-inspired Windows on Arm performance profiling tool. Profiling is based on the Arm AArch64 PMU and its hardware counters. WindowsPerf supports the counting model for obtaining aggregate counts of occurrences of PMU events, and the sampling model for determining the frequencies of event occurrences produced by program locations at the function, basic block, and instruction levels. WindowsPerf is an open-source project hosted on GitHub .
WindowsPerf consists of a kernel-mode driver and a user-space command-line tool. You can seamlessly integrate the WindowsPerf command line tool with both the WindowsPerf Visual Studio Extension and the WindowsPerf VS Code Extension . These extensions, which you can download from the Visual Studio Marketplace, enhance the functionality of WindowsPerf by providing a user-friendly interface, and additional features for performance analysis and debugging. This integration allows developers to efficiently analyze and optimize their applications directly within their preferred development environment.
You cannot use WindowsPerf on virtual machines, such as cloud instances.
WindowsPerf relies on dll
files installed with Visual Studio, from the Community Edition or higher and, optionally, installers from the Windows Driver Kit extension.
For information about the WDK installation process, see Download the Windows Driver Kit (WDK) .
See also the Visual Studio for Windows on Arm install guide .
You can download the latest release package, windowsperf-bin-<version>.zip
from the Arm GitHub repository:
https://github.com/arm-developer-tools/windowsperf/releases
To download directly from command prompt, use:
mkdir windowsperf-bin-3.8.0
cd windowsperf-bin-3.8.0
curl -L -O https://github.com/arm-developer-tools/windowsperf/releases/download/3.8.0/windowsperf-bin-3.8.0.zip
Unzip the package:
tar -xmf windowsperf-bin-3.8.0.zip
You can install the kernel driver using the supplied wperf-devgen
installer.
The wperf-devgen tool has been designated as the preferred installer and uninstaller for the WindowsPerf Kernel Driver in the latest release. This tool offers a simple process for managing the installation and removal of the driver.
You must install the driver as Administrator
.
Open a Windows Command Prompt terminal with Run as administrator selected.
Make sure you are in the windowsperf-bin-<version>
directory:
cd windowsperf-bin-3.8.0
Navigate to the wperf-driver
folder and run the installer:
cd wperf-driver
wperf-devgen install
The output should be similar to:
Executing command: install.
Install requested.
Device installed successfully
You can check everything is working by running the wperf
executable.
Once you have installed the driver, you can use wperf
without Administrator
privileges.
For example:
cd ..\wperf
wperf --version
You see output similar to:
Component Version GitVer FeatureString
========= ======= ====== =============
wperf 3.8.0 6d15ddfc +etw-app
wperf-driver 3.8.0 6d15ddfc +etw-drv
You can uninstall (or remove) the kernel driver using supplied wperf-devgen uninstaller.
You must uninstall the driver as Administrator
.
cd windowsperf-bin-3.8.0\wperf-driver
wperf-devgen uninstall
The output is similar to:
Executing command: uninstall.
Uninstall requested.
Root\WPERFDRIVER
Device found
Device uninstalled successfully
WindowsPerf GUI (Graphical User Interface) is a Visual Studio 2022 extension designed to bring a seamless UI experience to WindowsPerf, the command-line performance profiling tool for Windows on Arm. It is available on the Visual Studio Marketplace .
Install by opening Extensions menu, click Manage Extensions, and click Browse. Type WindowsPerf
to search for Arm WindowsPerf GUI extension. Click Install.
In order to set the path to the wperf.exe
executable, go to Tools -> Options -> WindowsPerf -> WindowsPerf Path and set the absolute path to the wperf.exe executable and then click on the Validate button.
Also, visit WindowsPerf GUI project website on GitHub for more details and latest updates.
In addition to the command-line tools, WindowsPerf
is available on the
VS Code Marketplace
.
Install by opening the Extensions view (Ctrl+Shift+X) and searching for WindowsPerf
. Click Install.
Open Settings (Ctrl+,) > Extensions > WindowsPerf, and specify the path to the wperf
executable.
You can only generate reports from a Windows on Arm device.
If using a non-Windows on Arm host, you can import and analyze WindowsPerf
JSON reports from such devices.
You do not need to install wperf
on non-Windows on Arm devices.
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.