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