Low Overhead Allocation Sampling in a Garbage Collected Virtual Machine

By: Christoph Jung, CF Bolz-Tereick

Abstract

Compared to the more commonly used time-based profiling, allocation profiling provides an alternate view of the execution of allocation heavy dynamically typed languages. We present a sampling allocation profiler that is deeply integrated into the garbage collector of PyPy, a Python virtual machine. Enabling allocation sampling profiling with a sampling period of 4 MB leads to a maximum time overhead of 25% in our benchmarks over un-profiled regular execution.

Keywords

Sampling Profiler, Allocation Profiler, Python, PyPy, Garbage Collection

Cite as:

Christoph Jung, CF Bolz-Tereick, “Low Overhead Allocation Sampling in a Garbage Collected Virtual Machine”, Journal of Object Technology, Volume 25, no. 1 ( 2026), pp. 1:1-12, doi:10.5381/jot.2026.25.1.a16.

DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn