# Sample Instructions with WindowsPerf and Arm SPE

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/cross-platform/windowsperf_sampling_cpython_spe/)
- [Overview of Arm Statistical Profiling Extension](https://learn.arm.com/learning-paths/cross-platform/windowsperf_sampling_cpython_spe/overview/)
- [Setup](https://learn.arm.com/learning-paths/cross-platform/windowsperf_sampling_cpython_spe/windowsperf_sampling_cpython_spe/)
- [WindowsPerf Sample using SPE](https://learn.arm.com/learning-paths/cross-platform/windowsperf_sampling_cpython_spe/windowsperf_sampling_cpython_spe_example_1/)
- [WindowsPerf Record using SPE](https://learn.arm.com/learning-paths/cross-platform/windowsperf_sampling_cpython_spe/windowsperf_sampling_cpython_spe_example_2/)
- [Summary](https://learn.arm.com/learning-paths/cross-platform/windowsperf_sampling_cpython_spe/summary/)
- [Next Steps](https://learn.arm.com/learning-paths/cross-platform/windowsperf_sampling_cpython_spe/_next-steps/)

## About this Learning Path

|  |  |
| --- | --- |
| Skill level: | Introductory |
| Reading time: | 30 min |
| Last updated: | 05 Aug 2026 |

|  |  |
| --- | --- |
| Author: | Przemyslaw Wirkus , Arm<br>[GitHub](https://github.com/PrzemekWirkus)<br>[LinkedIn](https://linkedin.com/in/przemyslaw-wirkus-78b73352) |
| Arm IP: | [Neoverse](https://support.arm.com/?tab=compute-ip&Product%20Type=Infrastructure%20Processors) [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors) |
| Tags: | [Performance and Architecture](https://learn.arm.com/tag/performance-and-architecture/) [Windows](https://learn.arm.com/tag/windows) [WindowsPerf](https://learn.arm.com/install-guides/wperf) [Python](https://learn.arm.com/tag/python) [perf](https://learn.arm.com/tag/perf) |

### Who is this for?
This is an introductory topic for developers who would like to learn about sampling CPU instructions with WindowsPerf and the Arm Statistical Profiling Extension (SPE).

### What will you learn?
After completing this Learning Path, you'll be able to perform the following tasks:
- Use WindowsPerf with a native Windows on Arm workload.
- Describe the basic concepts of sampling with Arm SPE.
- Explore the WindowsPerf command line.
- Build CPython from sources for Windows on Arm (AArch64).

### Prerequisites
Before starting, you'll need the following prerequisites:
- A Windows on Arm desktop or development machine, with CPU support for SPE.
- An installation of [WindowsPerf](https://learn.arm.com/install-guides/wperf/).
- An installation of [Visual Studio](https://learn.arm.com/install-guides/vs-woa/).
- An installation of [Git](https://learn.arm.com/install-guides/git-woa/).

### Summary
You’ll use WindowsPerf and the Arm SPE to sample CPU instructions on Windows on Arm. First, you’ll check SPE support in the CPU and WindowsPerf binaries, build a debug CPython for AArch64, and run a compute-heavy expression. Then, you’ll use `wperf sample` and `wperf record` to start the workload and capture samples. Finally, you’ll review the results with source annotation and disassembly.
