Affiliation:
1. Rice University, USA
2. University of Rochester, USA
3. Futurewei Technologies, USA
Abstract
Just-in-time (JIT) compilation coupled with code caching are widely used to improve performance in dynamic programming language implementations. These code caches, along with the associated profiling data for the hot code, however, consume significant amounts of memory. Furthermore, they incur extra JIT compilation time for their creation. On Android, the current standard JIT compiler and its code caches are not shared among processes—that is, the runtime system maintains a private code cache, and its associated data, for each runtime process. However, applications running on the same platform tend to share multiple libraries in common. Sharing cached code across multiple applications and multiple processes can lead to a reduction in memory use. It can directly reduce compile time. It can also reduce the cumulative amount of time spent interpreting code. All three of these effects can improve actual runtime performance.
In this paper, we describe ShareJIT, a global code cache for JITs that can share code across multiple applications and multiple processes. We implemented ShareJIT in the context of the Android Runtime (ART), a widely used, state-of-the-art system. To increase sharing, our implementation constrains the amount of context that the JIT compiler can use to optimize the code. This exposes a fundamental tradeoff: increased specialization to a single process’ context decreases the extent to which the compiled code can be shared. In ShareJIT, we limit some optimization to increase shareability. To evaluate the ShareJIT, we tested 8 popular Android apps in a total of 30 experiments. ShareJIT improved overall performance by 9% on average, while decreasing memory consumption by 16% on average and JIT compilation time by 37% on average.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
8 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Automatically Generated Supernodes for AST Interpreters Improve Virtual-Machine Performance;Proceedings of the 22nd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences;2023-10-22
2. Remote Just-in-Time Compilation for Dynamic Languages;Companion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity;2023-10-22
3. Reusing Just-in-Time Compiled Code;Proceedings of the ACM on Programming Languages;2023-10-16
4. DSPBooster: Offloading Unmodified Mobile Applications to DSPs for Power-performance Optimal Execution;2022 IEEE 46th Annual Computers, Software, and Applications Conference (COMPSAC);2022-06
5. Deoptfuscator: Defeating Advanced Control-Flow Obfuscation Using Android Runtime (ART);IEEE Access;2022