Christoph Pichler, Paley Li, Roland Schatz, Hanspeter Mössenböck,
"On Automating Hybrid Execution of Ahead-of-Time and Just-in-Time Compiled Code."
: VMIL 2024: Proceedings of the 16th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages, ACM Digital Library, 10-2024
Original Titel:
On Automating Hybrid Execution of Ahead-of-Time and Just-in-Time Compiled Code.
Sprache des Titels:
Englisch
Original Buchtitel:
VMIL 2024: Proceedings of the 16th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages
Original Kurzfassung:
The divergence between Ahead-of-Time (AOT) and Just-in-Time (JIT) compilation techniques presents a unique predicament when trying to achieve optimal performance in software applications. AOT compilation offers efficiency by pre-compiling and optimizing code, while JIT compilation enhances peak performance through dynamic optimization and speculation. However, the improved peak performance achieved by JIT compilation is offset by the poor warm-up performance due to the overhead caused by analyses and optimizations at run time. Previously, we proposed blending these two compilation techniques, aiming to maintain high peak performance while enhancing warm-up performance. Since the programmer had to manually select functions for AOT compilation, it required familiarity with the code base and with compilers in general. This paper presents a strategy for blending these two compilation techniques automatically. We provide an overview of language implementation features which have to be considered when implementing such an automated approach. We also propose a call-graph based analysis when determining whether certain code should be replaced by its AOT-compiled equivalent. We implemented our approach within GraalVM, a multi-language virtual machine based on the Java HotSpot VM. The results from different benchmarks show our approach leads to a speedup of 1.48× on average for data setup and up to 2.6× for warm-up and 3.5× for peak performance. Moreover, our automated approach is able to find optimizations which have easily been missed by manual annotations.