OCOLOS: Online COde Layout OptimizationS

Appeared in 2022 55th IEEE/ACM International Symposium on Microarchitecture (MICRO).

Abstract

The processor front-end has become an increasingly important bottleneck in recent years due to growing application code footprints, particularly in data centers. First-level instruction caches and branch prediction engines have not been able to keep up with this code growth, leading to more front-end stalls and lower Instructions Per Cycle (IPC). Profile-guided optimizations performed by compilers represent a promising approach, as they rearrange code to maximize instruction cache locality and branch prediction efficiency along a relatively small number of hot code paths. However, these optimizations require continuous profiling and rebuilding of applications to ensure that the code layout matches the collected profiles. If an application’s code is frequently updated, it becomes challenging to map profiling data from a previous version onto the latest version, leading to ignored profiling data and missed optimization opportunities.In this paper, we propose OCOLOS, the first online code layout optimization system for unmodified applications written in unmanaged languages. OCOLOS allows profile-guided optimization to be performed on a running process, instead of being performed offline and requiring the application to be re-launched. By running online, profile data is always relevant to the current execution and always maps perfectly to the running code. OCOLOS demonstrates how to achieve robust online code replacement in complex multithreaded applications like MySQL and MongoDB, without requiring any application changes. Our experiments show that OCOLOS can accelerate MySQL by up to 1.41×, the Verilator hardware simulator by up to 2.20×, and a build of the Clang compiler by up to 1.14×.

Publication date:
October 2022

Authors:
Yuxuan Zhang
Tanvir Ahmed Khan
Gilles Pokam
Baris Kasikci
Heiner Litz
Joseph Devietti

Projects:

Available media

Full paper text: PDF

Bibtex entry

@inproceedings{zhang-ocolos22,
  author       = {Yuxuan Zhang and Tanvir Ahmed Khan and Gilles Pokam and Baris Kasikci and Heiner Litz and Joseph Devietti},
  title        = {{OCOLOS}: Online {COde} Layout {OptimizationS}},
  booktitle    = {2022 55th IEEE/ACM International Symposium on Microarchitecture (MICRO)},
  pages        = {530-545},
  month        = oct,
  year         = {2022},
}
Last modified 21 Feb 2023