|
1 | 1 | --- |
2 | 2 | layout: learningpathall |
3 | | -title: WindowsPerf WPA Plugin |
| 3 | +title: Visualize data from WindowsPerf using WPA |
4 | 4 | weight: 2 |
5 | 5 | --- |
6 | 6 |
|
7 | | -# Overview |
| 7 | +## Before you begin |
8 | 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. |
| 9 | +The Windows Performance Analyzer (WPA) plugin connects WindowsPerf to the Windows Performance Analyzer. |
10 | 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). |
| 11 | +Before trying WPA with the WPA plugin, you need to install the following software on your Windows on Arm computer: |
14 | 12 |
|
15 | | -## WindowsPerf WPA Plugin releases |
| 13 | +- [WindowsPerf](/install-guides/wperf/) |
| 14 | +- [WPA plugin](/install-guides/windows-perf-wpa-plugin/) |
16 | 15 |
|
17 | | -You can find all binary releases of `WindowsPerf WPA Plugin` [here](https://github.com/arm-developer-tools/windowsperf-wpa-plugin/releases). |
| 16 | +The WPA plugin install guide includes the installation of WPA. |
18 | 17 |
|
19 | | -# Installation |
| 18 | +## Using WindowsPerf data in WPA |
20 | 19 |
|
21 | | -For installation instructions see the [install guide](/install-guides/windows-perf-wpa-plugin). |
| 20 | +In order to use WPA with WindowsPerf, you need to create a `.json` file which is created from a WindowsPerf `wperf stat` command running on a Windows on Arm machine. |
22 | 21 |
|
23 | | -## Using WindowsPerf WPA Plugin |
| 22 | +You can save a `.json` output from WindowsPerf by using the `--output` command followed by the filename. |
24 | 23 |
|
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 %}} |
| 24 | +1. Create a `.json` file |
29 | 25 |
|
30 | | -Example: |
| 26 | + To create a file named `example.json`, run the following command: |
31 | 27 |
|
32 | | -```command |
33 | | -wperf stat -e ld_spec --output example.json |
34 | | -``` |
| 28 | + ```console |
| 29 | + wperf stat -e ld_spec --output example.json |
| 30 | + ``` |
| 31 | + |
| 32 | +2. Open Windows Performance Analyzer, and see the following window: |
35 | 33 |
|
36 | | -Upon opening Windows Performance Analyzer, we are greeted with the following window: |
37 | | - |
| 34 | +  |
38 | 35 |
|
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. |
| 36 | + Confirm the `WindowsPerf WPA Plugin` appears under the Installed Plugins section. |
40 | 37 |
|
41 | | - |
| 38 | +3. Open the `.json` file |
42 | 39 |
|
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. |
| 40 | + Click "Open file..." from the start menu on the left side and select the `example.json` file. |
44 | 41 |
|
| 42 | +  |
| 43 | + |
| 44 | + When you click `Open`, the output file is checked for compatibility with the WPA plugin, and the main WPA window opens up. |
45 | 45 |
|
46 | 46 | ### Timeline |
47 | 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. |
| 48 | +The WindowsPerf timeline feature (command line option -t) enables continuous counting of Performance Monitoring Unit (PMU) events. |
| 49 | + |
| 50 | +You can specify sleep intervals (with -i) between counts and set the number of repetitions (with -n), allowing for detailed and flexible data collection. |
52 | 51 |
|
53 | | -For this example we will be running the following command: |
| 52 | +You can use WPA to visualize PMU events in the recorded data. |
| 53 | + |
| 54 | +To try the timeline feature, run the command: |
54 | 55 |
|
55 | 56 | ```command |
56 | 57 | wperf stat -m dcache -c 0,1,2,3,4,5,6,7 -t -i 0 -n 50 --json |
57 | 58 | ``` |
58 | 59 |
|
59 | | -Importing the generated output in WPA will show us the following graph: |
60 | | - |
| 60 | +Open the generated output (`.json` file) in WPA to see the graph: |
61 | 61 |
|
62 | | -We can change the default grouping from `Group by core` to `Group by event` to see the following graph instead: |
63 | | - |
| 62 | + |
64 | 63 |
|
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. |
| 64 | +You can change the default grouping from `Group by core` to `Group by event` and see the following graph: |
66 | 65 |
|
67 | | -For this example, the following command was used instead: |
| 66 | + |
68 | 67 |
|
69 | | -```command |
| 68 | +The WPA plugin also generates a graph per event note in order to provide a more in-depth grouping of events. |
| 69 | + |
| 70 | +To see all the generated graphs you can expand the `Counting timeline` section in the graph explorer section of WPA. |
| 71 | + |
| 72 | +Run another `wperf` command with different options: |
| 73 | + |
| 74 | +```console |
70 | 75 | 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 | 76 | ``` |
72 | 77 |
|
73 | | - |
| 78 | +The graph after opening the `.json` file is shown below: |
| 79 | + |
| 80 | + |
74 | 81 |
|
75 | | -We can double click on any graph to expand it under the Analysis tab for further data visualization. |
| 82 | +You can double click on any graph to expand it under the Analysis tab for further data visualization. |
76 | 83 |
|
77 | 84 | ### Telemetry |
78 | 85 |
|
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. |
| 86 | +The WPA Plugin also provides visualization of [Arm telemetry metrics](https://developer.arm.com/documentation/109542/0100/About-Arm-CPU-Telemetry-Solution). |
80 | 87 |
|
81 | | -For this example, the following command was used: |
| 88 | +To visualize telemetry, run the following command: |
82 | 89 |
|
83 | | -```command |
| 90 | +```console |
84 | 91 | 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 | 92 | ``` |
86 | 93 |
|
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. |
| 94 | +You can also see the telemetry timeline graphs under the graph explorer level in WPA. |
| 95 | + |
| 96 | +These graphs are generated dynamically so only the relevant metrics for the given `.json` output file are visible. |
88 | 97 |
|
89 | | - |
| 98 | + |
90 | 99 |
|
91 | 100 | Once expanded, a more in-depth view is visible under the Analysis tab of WPA. |
92 | 101 |
|
93 | | - |
| 102 | + |
| 103 | + |
| 104 | +You now have a basic understanding of how to use `wperf` generated data in the Windows Performance Analyzer. |
0 commit comments