Who is this for?

This is an introductory topic for developers keen to understand sampling and who are new to the Arm architecture.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Use WindowsPerf with native Windows on Arm workload
  • Understand the basics of sampling
  • Explore the WindowsPerf command line
  • Build CPython from sources for Windows on Arm ARM64 target

Prerequisites

Before starting, you will need the following:

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll build a debug CPython for Windows on Arm, then use WindowsPerf to measure a Python workload. First, you’ll pin python_d.exe to one core, run counting and sampling, and locate hot runtime code. Then, you’ll also use record and -c to launch the interpreter with arguments, creating repeatable measurements that distinguish aggregate counts from sampled locations.

Frequently asked questions

AI-assisted

These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
What result should I expect from counting versus sampling?
Counting returns aggregate totals for the selected events across the run. Sampling reports event frequencies tied to locations in the CPython runtime image so you can see where activity is concentrated.
Which CPU core should I pin `python_d.exe` to?
Any single core is acceptable. Choose one and use it consistently across runs. Pinning reduces variability and makes results easier to compare.
How do I launch CPython with WindowsPerf without starting it first?
Use the record command to spawn the process and pin it with the -c option. Specify the target either with --pe_file or by appending the python_d.exe command at the end of the WindowsPerf invocation.
How do I pass arguments to CPython when using the record command?
Place all application arguments after the WindowsPerf options. WindowsPerf forwards them verbatim to the spawned program.
What should I look for after running the Googolplex calculation?
Expect a sustained workload that exercises integer computation in CPython. Sampling output should attribute activity to hot locations in the CPython runtime image. If you see only totals, you ran counting instead of sampling.
Next