Profile-Guided Field Externalization in an Ahead-Of-Time Compiler

  • Sebastian Kloibhofer*
  • , Lukas Makor
  • , Peter Hofer
  • , David Leopoldseder
  • , Hanspeter Mössenböck
  • *Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference proceedingspeer-review

Abstract

Field externalization is a technique to reduce the footprint of objects by removing fields that most frequently contain zero or null. While researchers have developed ways to bring this optimization into the Java world, these have been limited to research compilers or virtual machines for embedded systems. In this work, we present a novel field externalization technique that uses information from static analysis and profiling to determine externalizable fields. During compilation, we remove those fields and define companion classes. These are used in case of non-default-value writes to the externalized fields. Our approach also correctly handles synchronization to prevent issues in multithreaded environments. We integrated our approach into the modern Java ahead-of-time compiler GraalVM Native Image. We conducted an evaluation on a diverse set of benchmarks that includes standard and microservice-based benchmarks. For standard benchmarks, our approach reduces the total allocated bytes by 2.76% and the maximum resident set size (max-RSS) by 2.55%. For microservice benchmarks, we achieved a reduction of 6.88% for normalized allocated bytes and 2.45% for max-RSS. We computed these improvements via the geometric mean. The median reductions are are 1.46% (alloc. bytes) and 0.22% (max-RSS) in standard benchmarks, as well as 3.63% (alloc. bytes) and 0.20% (max-RSS) in microservice benchmarks.
Original languageEnglish
Title of host publication39th European Conference on Object-Oriented Programming (ECOOP 2025)
EditorsJonathan Aldrich, Alexandra Silva
Pages19:1-19:32
Number of pages32
Edition1
ISBN (Electronic)9783959773737
DOIs
Publication statusPublished - 25 Jun 2025

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume333
ISSN (Print)1868-8969

Fields of science

  • 102009 Computer simulation
  • 102013 Human-computer interaction
  • 102011 Formal languages
  • 102022 Software development
  • 102029 Practical computer science
  • 102 Computer Sciences
  • 102024 Usability research

JKU Focus areas

  • Digital Transformation

Cite this