Thesis of Sebastian Jordan Montano

Profilage de la mémoire pour des logiciels plus verts dans les langages dynamiquement typés

Modern programming languages provide automatic memory management through garbage collectors. Garbage collectors are complex pieces of software that expose hundreds of tunable parameters. Diagnosing memory-related performance issues requires dynamic information about object lifetimes and allocation contexts, yet profiling this information is challenging due to instrumentation overhead, observer effects, and measurement biases. These challenges are amplified in pure object-oriented languages, where every allocation is performed by message passing through a small set of primitive allocator methods shared across the entire system, and where instrumentation must coexist with the language's reflective infrastructure. This thesis investigates memory profiling and profile-guided memory optimizations for dynamically typed, pure object-oriented languages, using Pharo as the experimentation platform. It contributes (i) mps, a meta-safe, unwind-safe, and JIT-compatible message-passing control library that serves as the instrumentation backend for the rest of the work; (ii) illi, a framework for building custom memory profilers, and filip, an object lifetime profiler built on top of illi that uses ephemeron-based finalization to estimate lifetimes without virtual machine modifications; and (iii) a path-sensitive pretenuring algorithm that uses the call-stack information provided by filip to refine the notion of allocation site beyond traditional textual definitions. Classical pretenuring is based on the textual allocation site — the method and bytecode offset at which an allocation instruction appears. In pure object-oriented languages, however, every allocation goes through a small set of primitive methods shared across the entire system, so all textual sites collapse to few methods. We evaluate this strategy on real-world applications and find that it yields limited and inconsistent improvements and can even degrade performance by pretenuring short-lived objects from unrelated callers. We propose a path-sensitive pretenuring algorithm that addresses this limitation by incorporating the full calling context into allocation site identification. The algorithm constructs a weighted allocation call graph from profiling samples, classifies its edges by object lifetime, and rewrites application code to selectively pretenure long-lived allocation paths. Path-sensitive pretenuring consistently improves upon the textual strategy, achieving speedups of up to 11% on real-world applications. The proposed techniques are evaluated on real-world Pharo applications. mps introduces an average instrumentation overhead of $1.54 imes$ and is on average $6.47 imes$ faster than an equivalent implementation that does not integrate with the JIT compiler. filip is shown to be actionable in the sense of Mytkowicz~etal with an average execution-time overhead of $1.26 imes$ at a $0.1%$ sampling rate. Following open science principles, all artifacts are released under the MIT license and have been used to identify and fix memory issues in production Pharo code.

Jury

M. Stéphane DUCASSE Directeur de recherche Université de Lille Directeur de thèse, M. Guillermo POLITO Chargé de recherche INRIA Co-directeur de thèse, M. Tobias WRIGSTAD Full professor Uppsala University Rapporteur, M. Gaël THOMAS Directeur de recherche INRIA Rapporteur, Mme Gordana RAKIC Associate Professor University of Novi Sad Examinatrice.

Thesis of the team EVREF defended on 14/09/2026