Virtual machines (VMs) with dynamic compilers typically specialize compiled code to the state of the running VM instance and thus cannot reuse the code between multiple runs of the same application. The JIT compiler must recompile the same methods for each run of the application separately, which can prolong the application’s warmup time. We propose a technique to reduce compilation time by reusing a highly optimized intermediate representation (IR). We achieve this by tracing compiler-interface calls during compilation. The validity of the specializations in the IR is verified during a replay stage, and the replay also facilitates the relocation of runtime object references. The IR is stored on a compilation server, which can compile it to machine code and provide the code to local or remote VM instances. We implemented a compilation server with IR caching for GraalVM, a high-performance production-grade Java Virtual Machine (JVM). We present an evaluation based on four industry-standard benchmark suites. In each suite, our approach reduces compilation time by 23.6% to 36.8% and warmup time by 13.1% to 21.2% on average while preserving peak application performance.
@InProceedings{pecimuth_et_al:LIPIcs.ECOOP.2025.25, author = {Pe\v{c}im\'{u}th, Andrej and Leopoldseder, David and T\r{u}ma, Petr}, title = {{Reusing Highly Optimized IR in Dynamic Compilation}}, booktitle = {39th European Conference on Object-Oriented Programming (ECOOP 2025)}, pages = {25:1--25:25}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-95977-373-7}, ISSN = {1868-8969}, year = {2025}, volume = {333}, editor = {Aldrich, Jonathan and Silva, Alexandra}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2025.25}, URN = {urn:nbn:de:0030-drops-233176}, doi = {10.4230/LIPIcs.ECOOP.2025.25}, annote = {Keywords: code reuse, compilation time, warmup, remote compilation, dynamic compilation, virtual machines} }
Feedback for Dagstuhl Publishing