|
| 1 | +--- |
| 2 | +### Title the install tools article with the name of the tool to be installed |
| 3 | +### Include vendor name where appropriate |
| 4 | +title: WindowsPerf Ecosystem - the Windows Performance Analyzer (WPA) Plugin |
| 5 | +minutes_to_complete: 5 |
| 6 | + |
| 7 | +official_docs: https://github.com/arm-developer-tools/windowsperf-wpa-plugin |
| 8 | + |
| 9 | +author_primary: Alaaeddine Chakroun |
| 10 | + |
| 11 | +### Optional additional search terms (one per line) to assist in finding the article |
| 12 | +additional_search_terms: |
| 13 | + - perf |
| 14 | + - profiling |
| 15 | + - profiler |
| 16 | + - windows |
| 17 | + - woa |
| 18 | + - windows on arm |
| 19 | + - open source windows on arm |
| 20 | + - windows performance analyzer |
| 21 | + - wpa |
| 22 | + - windowsperf |
| 23 | +### FIXED, DO NOT MODIFY |
| 24 | +weight: 1 # Defines page ordering. Must be 1 for first (or only) page. |
| 25 | +tool_install: true # Set to true to be listed in main selection page, else false |
| 26 | +multi_install: FALSE # Set to true if first page of multi-page article, else false |
| 27 | +multitool_install_part: false # Set to true if a sub-page of a multi-page article, else false |
| 28 | +layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles |
| 29 | +--- |
| 30 | + |
| 31 | +## Introduction |
| 32 | + |
| 33 | +[**WindowsPerf**](https://github.com/arm-developer-tools/windowsperf) is a lightweight performance profiling tool inspired by Linux perf, specifically tailored for Windows on Arm. |
| 34 | +It leverages the Arm64 PMU (Performance Monitor Unit) and its hardware counters to offer precise profiling capabilities. |
| 35 | +The **WindowsPerf WPA plugin** bridges the gap between the detailed output of **WindowsPerf** and the powerful capabilities of **Windows Performance Analyzer**. |
| 36 | + |
| 37 | +The plugin is built on the [`microsoft-performance-toolkit-sdk`](https://github.com/microsoft/microsoft-performance-toolkit-sdk) and is shipped as a single `.dll` file. |
| 38 | + |
| 39 | + |
| 40 | +**Windows Performance Analyzer (WPA)** is a tool that creates graphs and data tables of Event Tracing for Windows (ETW) events that are recorded by Windows Performance Recorder (WPR), Xperf, or an assessment that is run in the Assessment Platform. WPA can open any event trace log (ETL) file for analysis. |
| 41 | + |
| 42 | +WPA's capabilities can be expanded upon using the `microsoft-performance-toolkit-sdk` by creating plugins which enables parsing any type of data (`.json` in this case). |
| 43 | + |
| 44 | + |
| 45 | +## A Glimpse of the available features |
| 46 | + |
| 47 | +The WindowsPerf GUI extension is composed of several key features, each designed to streamline the user experience: |
| 48 | + |
| 49 | +- **Timeline View**: Visualize a `wperf stat` timeline command output as a plotted graph grouped by event group. |
| 50 | + |
| 51 | + |
| 52 | +- **Telemetry View**: Display telemetry events grouped by unit ready to be compared and diagnosed. |
| 53 | + |
| 54 | + |
| 55 | +## Getting Started |
| 56 | +### Installation |
| 57 | + |
| 58 | +WPA is included in the Windows Assessment and Deployment Kit (Windows ADK) that can be downloaded [here](https://go.microsoft.com/fwlink/?linkid=2243390). |
| 59 | + |
| 60 | +> The wperf WPA plugin requires a WPA version of `11.0.7.2` or higher. |
| 61 | +
|
| 62 | +Once downloaded, make sure that "Windows Performance Toolkit" checkbox is checked under "Select the features you want to install/change". |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +The plugin can be downloaded from the [releases page](https://github.com/arm-developer-tools/windowsperf-wpa-plugin/releases). |
| 67 | + |
| 68 | +To install the plugin you have the option between: |
| 69 | + |
| 70 | +- Moving the plugin dll to the **CustomDataSources** directory next to the WPA executable (defaults to `C:\\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\CustomDataSources`). |
| 71 | +- Setting up the `WPA_ADDITIONAL_SEARCH_DIRECTORIES` env variable and moving the dll to that directory |
| 72 | +- Calling `wpa` from the command line and passing the plugin directory to the `-addsearchdir` flag (example : `wpa -addsearchdir "%USERPROFILE%\plugins"`). |
| 73 | + |
| 74 | +<img |
| 75 | + src="_images/about-wpa.png" |
| 76 | + alt="About WPA" |
| 77 | + style="display: block; margin: 0 auto" |
| 78 | +/> |
| 79 | + |
| 80 | +> To verify that the plugin is loaded successfully, launch WPA then the plugin should appear under Help > About Windows Performance Analyzer. |
| 81 | +
|
| 82 | + |
| 83 | +### Running from the command line |
| 84 | + |
| 85 | +After installing WPA, it should be added automatically to the path environnment variable. |
| 86 | +If it's not the case, add the WPA directory (defaults to `C:\\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit`) to your environnment variable. |
| 87 | + |
| 88 | + |
| 89 | +To open a json file directly from the command line, you can use the `-i` flag to specify the file path to open. |
| 90 | + |
| 91 | +Example: to open a `timeline_long.json` that sits in the Downloads directory, run the following command in the command line: |
| 92 | + |
| 93 | +`wpa -i \"%USERPROFILE%\\Downloads\\timeline_long.json\"` |
| 94 | + |
| 95 | +### Running in debug mode |
| 96 | + |
| 97 | +To run the plugin in debug mode, clone the repository then edit `WPAPlugin/Properties/launchSettings.json` file. |
| 98 | + |
| 99 | +```json |
| 100 | +{ |
| 101 | + "profiles": { |
| 102 | + "Debug": { |
| 103 | + "commandName": "Executable", |
| 104 | + "executablePath": "C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\wpa.exe", |
| 105 | + "commandLineArgs": "-nodefault -addsearchdir \"%USERPROFILE%\\devProjects\\wpa-plugin\\WPAPlugin\\bin\\Debug\\netstandard2.0\"" |
| 106 | + } |
| 107 | + } |
| 108 | +} |
| 109 | + |
| 110 | +``` |
| 111 | + |
| 112 | +- `executablePath`: Path to the `wpa` executable |
| 113 | +- `commandLineArgs`: Absolute path to `bin/Debug/netstandard2.0` |
| 114 | + |
| 115 | + |
| 116 | +> Make sure that no other version of the plugin is in the same directory as WPA. |
| 117 | +
|
| 118 | + |
| 119 | +### Uninstalling the plugin |
| 120 | + |
| 121 | +To uninstall the plugin simply delete the `.dll` file. |
0 commit comments