Skip to content

Author

B. Spasojević

1 paper indexed here

We haven’t gathered this author’s papers yet. Follow them and we’ll fetch their work.

Not the right person? Other researchers publish under this name.

Open access Jul 2026

Context-Aware Inlining: Using Call-Stack Profiles for Fast and Smaller Binaries

To improve a program’s performance and avoid excessive binary-size growth, compiler optimizations can be applied on only the most frequently executed parts of the program, i.e. hot code. Ahead-of-time (AOT) compilation can benefit from profiles to determine the hot code, and to improve optimization decisions with respect to code hotness. In this article, we present a novel technique for reducing the size of AOT compiled programs by using fully-context-sensitive profiles to concentrate the optimizations on the hot code. These profiles enable capturing different behaviors of the same subroutine when invoked from different calling contexts. We use this information to identify those subroutines that contribute significantly to the program’s performance and compile them differently according to their calling contexts. We implemented this technique inside GraalVM Native Image, a state-of-the-art AOT compiler for Java, and performed an evaluation on 29 benchmarks from DaCapo, Scalabench, and Renaissance benchmarking suites. With this selective subroutine specialization, we achieved significant binary-size reductions, ranging from \(11\% \) to \(38\% \) compared to the Enterprise version of GraalVM Native Image with PGO, while retaining similar performance as the O3 optimization level with PGO.

Maja Vukasović, Petar Đekanović, B. Spasojević et al. · 0 citations