JavART: A Lightweight Rule-Based JIT Compiler using Translation Rules Extracted from a Learning Approach
Open Access
- 9 April 2025
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Programming Languages
- Vol. 9 (OOPSLA1) , 113-142
Abstract
The balance between the compilation/optimization time and the produced code quality is very important for Just-In-Time (JIT) compilation. Time-consuming optimizations can cause delayed deployment of the optimized code, and thus more execution time needs to be spent either in the interpretation or less optimized code, leading to a performance drag. Such a performance drag can be detrimental to mobile and client-side devices such as those running Android, where applications are often shorting-running, frequently restarted and updated. To tackle this issue, this paper presents a lightweight learning-based, rule-guided dynamic compilation approach to generate good-quality native code directly without the need to go through the interpretive phase and the first-level optimization at runtime. Different from existing JIT compilers, the compilation process is driven by translation rules, which are automatically learned offline by taking advantage of existing JIT compilers. We have implemented a prototype of our approach based on Android 14 to demonstrate the feasibility and effectiveness of such a lightweight rule-based approach using several real-world applications. Results show that, compared to the default mode running with the interpreter and two tiers of JIT compilers, our prototype can achieve a 1.23× speedup on average. Our proposed compilation approach can also generate native code 5.5× faster than the existing first-tier JIT compiler in Android, with the generated code running 6% faster. We also implement and evaluate our approach on a client-side system running Hotspot JVM, and the results show an average of 1.20× speedup.Keywords
Funding Information
- National Science Foundation (CNS-2330752,CNS-2401873)
- National Key Research and Development Program of China (No.2022YFB450040)
This publication has 52 references indexed in Scilit:
- An Optimization-Driven Incremental Inline Substitution Algorithm for Just-in-Time Compilers2019
- Analyzing the performance of code-copying virtual machines2008
- Design of the Java HotSpot™ client compiler for Java 6ACM Transactions on Architecture and Code Optimization, 2008
- Phase-based adaptive recompilation in a JVM2008
- Design and implementation of a comprehensive real-time java virtual machine2007
- The DaCapo benchmarks2006
- Fast and efficient partial code reordering2006
- Context Threading: A Flexible and Efficient Dispatch Technique for Virtual Machine Interpreters2005
- LaTTe: a Java VM just-in-time compiler with fast and efficient register allocation2003
- Compiling Java just in timeIEEE Micro, 1997