Search Results

Documents authored by Tůma, Petr


Document
Extended Abstract
A Pragmatic Approach to Replay Compilation (Extended Abstract)

Authors: Andrej Pečimúth, David Leopoldseder, and Petr Tůma

Published in: OASIcs, Volume 134, Companion Proceedings of the 9th International Conference on the Art, Science, and Engineering of Programming (Programming 2025)


Abstract
Dynamic compilers generate code based on the information provided by the virtual machine (VM) running the corresponding application. Due to the environment’s non-deterministic nature, every compilation result is typically unique. This is a problem when reproducibility is desired, such as when debugging a crash of the JIT compiler or diagnosing performance problems. As a solution, we present a pragmatic approach to replay compilation that is suitable for integration in a production-grade VM. Our approach is based on instrumenting the VM’s compiler interface, allowing us to record the compiler’s queries and their results to the VM. We serialize them and use them to replicate the compiler’s query results in a replayed compilation. Assuming the compiler is deterministic, this approach systematically ensures that the replayed compilation result is equivalent to the recorded one. The dynamic compiler is invoked directly without the need to execute the original application. A compiler developer can replay a compilation with additional diagnostic options or evaluate metrics such as compilation speed. We developed a working prototype for GraalVM, showing that replay compilation can be implemented without requiring extensive compiler or VM changes. We are working with the GraalVM developers to integrate it into the open-source compiler to unlock these benefits and new use cases for the community.

Cite as

Andrej Pečimúth, David Leopoldseder, and Petr Tůma. A Pragmatic Approach to Replay Compilation (Extended Abstract). In Companion Proceedings of the 9th International Conference on the Art, Science, and Engineering of Programming (Programming 2025). Open Access Series in Informatics (OASIcs), Volume 134, pp. 3:1-3:4, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2025)


Copy BibTex To Clipboard

@InProceedings{pecimuth_et_al:OASIcs.Programming.2025.3,
  author =	{Pe\v{c}im\'{u}th, Andrej and Leopoldseder, David and T\r{u}ma, Petr},
  title =	{{A Pragmatic Approach to Replay Compilation}},
  booktitle =	{Companion Proceedings of the 9th International Conference on the Art, Science, and Engineering of Programming (Programming 2025)},
  pages =	{3:1--3:4},
  series =	{Open Access Series in Informatics (OASIcs)},
  ISBN =	{978-3-95977-382-9},
  ISSN =	{2190-6807},
  year =	{2025},
  volume =	{134},
  editor =	{Edwards, Jonathan and Perera, Roly and Petricek, Tomas},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/OASIcs.Programming.2025.3},
  URN =		{urn:nbn:de:0030-drops-242874},
  doi =		{10.4230/OASIcs.Programming.2025.3},
  annote =	{Keywords: replay compilation, dynamic compilation, virtual machines}
}
Document
Reusing Highly Optimized IR in Dynamic Compilation

Authors: Andrej Pečimúth, David Leopoldseder, and Petr Tůma

Published in: LIPIcs, Volume 333, 39th European Conference on Object-Oriented Programming (ECOOP 2025)


Abstract
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.

Cite as

Andrej Pečimúth, David Leopoldseder, and Petr Tůma. Reusing Highly Optimized IR in Dynamic Compilation. In 39th European Conference on Object-Oriented Programming (ECOOP 2025). Leibniz International Proceedings in Informatics (LIPIcs), Volume 333, pp. 25:1-25:25, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2025)


Copy BibTex To Clipboard

@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}
}
Any Issues?
X

Feedback on the Current Page

CAPTCHA

Thanks for your feedback!

Feedback submitted to Dagstuhl Publishing

Could not send message

Please try again later or send an E-mail