Skip to content

Commit 8106708

Browse files
Merge pull request #1336 from Alaaeddine-chakroun/windowsperf-wpa-plugin-learning-path
Add WindowsPerf WPA Plugin tutorial
2 parents 9778131 + 98fc1b8 commit 8106708

File tree

10 files changed

+174
-0
lines changed

10 files changed

+174
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Get started with WindowsPerf WPA Plugin
3+
4+
minutes_to_complete: 15
5+
6+
who_is_this_for: This is an introductory topic for software developers working on laptops and desktops and new to the Arm architecture.
7+
8+
learning_objectives:
9+
- Install WindowsPerf WPA Plugin on Windows
10+
- Import a WindowsPerf counting timeline as a .json file in WPA
11+
- Visualize the timeline in WPA using the Windowsperf WPA Plugin
12+
13+
prerequisites:
14+
- Windows desktop or development machine
15+
- Windows Performance Analyzer installed
16+
- WindowsPerf WPA Plugin installed
17+
- (Optional) [WindowsPerf](/install-guides/wperf/) installed on a WoA machine [(Installation guide)](/install-guides/wperf/)
18+
19+
author_primary: Alaaeddine Chakroun
20+
21+
### Tags
22+
skilllevels: Introductory
23+
subjects: Performance and Architecture
24+
armips:
25+
- Cortex-A
26+
- neoverse
27+
operatingsystems:
28+
- Windows
29+
tools_software_languages:
30+
- WindowsPerf
31+
- perf
32+
- Windows Performance Analyzer
33+
34+
### FIXED, DO NOT MODIFY
35+
# ================================================================================
36+
weight: 1 # _index.md always has weight of 1 to order correctly
37+
layout: "learningpathall" # All files under learning paths have this same wrapper
38+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
39+
---
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
next_step_guidance: Now that you have an idea of how the WindowsPerf WPA Plugin works, You can try exploring the WindowsPerf CLI for more flexibility.
3+
4+
recommended_path: "/learning-paths/laptops-and-desktops/windowsperf_sampling_cpython"
5+
6+
further_reading:
7+
- resource:
8+
title: Announcing WindowsPerf Open-source performance analysis tool for Windows on Arm
9+
link: https://community.arm.com/arm-community-blogs/b/infrastructure-solutions-blog/posts/announcing-windowsperf
10+
type: blog
11+
- resource:
12+
title: WindowsPerf Release 3.7.2
13+
link: https://www.linaro.org/blog/expanding-profiling-capabilities-with-windowsperf-372-release/
14+
type: blog
15+
- resource:
16+
title: WindowsPerf Visual Studio Extension v2.1.0
17+
link: https://www.linaro.org/blog/launching--windowsperf-visual-studio-extension-v210/
18+
type: blog
19+
- resource:
20+
title: Windows on Arm overview
21+
link: https://learn.microsoft.com/en-us/windows/arm/overview
22+
type: website
23+
- resource:
24+
title: Linaro Windows on Arm project
25+
link: https://www.linaro.org/windows-on-arm/
26+
type: website
27+
- resource:
28+
title: WindowsPerf Visual Studio extension releases
29+
link: https://github.com/arm-developer-tools/windowsperf-vs-extension/releases
30+
type: website
31+
- resource:
32+
title: WindowsPerf releases
33+
link: https://github.com/arm-developer-tools/windowsperf/releases
34+
type: website
35+
36+
# ================================================================================
37+
# FIXED, DO NOT MODIFY
38+
# ================================================================================
39+
weight: 21 # set to always be larger than the content in this path, and one more than 'review'
40+
title: "Next Steps" # Always the same
41+
layout: "learningpathall" # All files under learning paths have this same wrapper
42+
---
11.2 KB
Loading
64 KB
Loading
59.7 KB
Loading
63.1 KB
Loading
30.9 KB
Loading
27.1 KB
Loading
32.2 KB
Loading
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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+
![wpa-first-screen](figures/wpa-first-screen.png)
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+
![wpa-open-file](figures/wpa-open-file.png)
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+
![timeline-by-core](figures/timeline-by-core.png)
61+
62+
We can change the default grouping from `Group by core` to `Group by event` to see the following graph instead:
63+
![timeline-by-event](figures/timeline-by-event.png)
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+
![timeline-events-by-key](figures/timeline-events-by-key.png)
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+
![telemetry-preview](figures/telemetry-preview.png)
90+
91+
Once expanded, a more in-depth view is visible under the Analysis tab of WPA.
92+
93+
![telemetry-table](figures/telemetry-table.png)

0 commit comments

Comments
 (0)