|
| 1 | +--- |
| 2 | +layout: learningpathall |
| 3 | +title: WindowsPerf WPA Plugin |
| 4 | +weight: 2 |
| 5 | +--- |
| 6 | + |
| 7 | +# Overview |
| 8 | + |
| 9 | +WindpwsPerf WPA plugin is a plugin built for WPA that parses JSON output of `wperf` command line tool to visualize counting and telemetry events as timeline graphs. |
| 10 | + |
| 11 | +[**WindowsPerf**](https://github.com/arm-developer-tools/windowsperf) is a lightweight performance profiling tool inspired by Linux perf, specifically tailored for Windows on Arm. |
| 12 | +It leverages the ARM64 PMU (Performance Monitor Unit) and its hardware counters to offer precise profiling capabilities. |
| 13 | +The [WindowsPerf WPA plugin](https://github.com/arm-developer-tools/windowsperf-wpa-plugin) bridges the gap between the detailed output of **WindowsPerf** and the powerful capabilities of [Windows Performance Analyzer](https://learn.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-analyzer). |
| 14 | + |
| 15 | +## WindowsPerf WPA Plugin releases |
| 16 | + |
| 17 | +You can find all binary releases of `WindowsPerf WPA Plugin` [here](https://github.com/arm-developer-tools/windowsperf-wpa-plugin/releases). |
| 18 | + |
| 19 | +# Installation |
| 20 | + |
| 21 | +For installation instructions see the [install guide](/install-guides/windows-perf-wpa-plugin). |
| 22 | + |
| 23 | +## Using WindowsPerf WPA Plugin |
| 24 | + |
| 25 | +In order to use the `WindowsPerf WPA Plugin`, we first need to get a `.json` output from a WindowsPerf `wperf stat` command running on a Windows on Arm machine. |
| 26 | +{{% notice Note%}} |
| 27 | +In order to get a `.json` output from WindowsPerf, we need to use the `--output` command followed by the filename. |
| 28 | +{{% /notice %}} |
| 29 | + |
| 30 | +Example: |
| 31 | + |
| 32 | +```command |
| 33 | +wperf stat -e ld_spec --output example.json |
| 34 | +``` |
| 35 | + |
| 36 | +Upon opening Windows Performance Analyzer, we are greeted with the following window: |
| 37 | + |
| 38 | + |
| 39 | +As we can see, the `WindowsPerf WPA Plugin` is installed correctly and it appears under the Installed Plugins section. We can then click on "Open file..." from the start menu on the left side and we're prompted to choose a `.json` file. |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +By clicking "Open", the output file is then validated to check its format and compatibility with the plugin, and finally the main WPA window opens up. |
| 44 | + |
| 45 | + |
| 46 | +### Timeline |
| 47 | + |
| 48 | +The WindowsPerf timeline feature (command line option -t) enable continuous counting of Performance Monitoring Unit (PMU) events. |
| 49 | +Users can specify sleep intervals (with -i) between counts and set the number of repetitions (with -n), allowing for detailed and flexible data collection. |
| 50 | +Users can take advantage of the `WindowsPerf WPA Plugin` to visualize these complex measurements. |
| 51 | +This plugin allows for detailed graphical representation of the PMU event data in WPA. |
| 52 | + |
| 53 | +For this example we will be running the following command: |
| 54 | + |
| 55 | +```command |
| 56 | +wperf stat -m dcache -c 0,1,2,3,4,5,6,7 -t -i 0 -n 50 --json |
| 57 | +``` |
| 58 | + |
| 59 | +Importing the generated output in WPA will show us the following graph: |
| 60 | + |
| 61 | + |
| 62 | +We can change the default grouping from `Group by core` to `Group by event` to see the following graph instead: |
| 63 | + |
| 64 | + |
| 65 | +The WindowsPerf WPA Plugin also generates a graph per event note in order to provide a more in-depth grouping of events. To see all the generated graphs we can expand the `Counting timeline` section in the graph explorer section of WPA. |
| 66 | + |
| 67 | +For this example, the following command was used instead: |
| 68 | + |
| 69 | +```command |
| 70 | +wperf stat -t -i 0 -m imix,l1d_cache_miss_ratio,l1d_cache_mpki,l1d_tlb_miss_ratio,l1d_tlb_mpki -e inst_spec,vfp_spec,ld_spec,st_spec -c 1 --json |
| 71 | +``` |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +We can double click on any graph to expand it under the Analysis tab for further data visualization. |
| 76 | + |
| 77 | +### Telemetry |
| 78 | + |
| 79 | +The `WindowsPerf WPA Plugin` also allows the visualization of [Arm telemetry metrics](https://developer.arm.com/documentation/109542/0100/About-Arm-CPU-Telemetry-Solution) counted similarly to counting events. |
| 80 | + |
| 81 | +For this example, the following command was used: |
| 82 | + |
| 83 | +```command |
| 84 | +wperf stat -t -i 0 -m imix,l1d_cache_miss_ratio,l1d_cache_mpki,l1d_tlb_miss_ratio,l1d_tlb_mpki -e inst_spec,vfp_spec,ld_spec,st_spec -c 1 --json |
| 85 | +``` |
| 86 | + |
| 87 | +Similarlry to the graphs generated per event note for timeline events, we can also see the generated telemetry timeline graphs under the grapher explorer level in WPA. These graphs are generated dynamically so only the relevant metrics for the given `.json` output file are visible. |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +Once expanded, a more in-depth view is visible under the Analysis tab of WPA. |
| 92 | + |
| 93 | + |
0 commit comments