Sampling CPython with WindowsPerf
Review frequently asked questions
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.
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.
Any single core is acceptable. Choose one and use it consistently across runs. Pinning reduces variability and makes results easier to compare.
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.Place all application arguments after the WindowsPerf options. WindowsPerf forwards them verbatim to the spawned program.
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.