Rice University
ShareJIT: JIT Code Cache Sharing across Processes and Its Practical Implementation
Abstract
dc:description.abstractJust-in-time (JIT) compilation coupled with code caching are widely used to improve performance in dynamic programming language implementations. Code caches and the associated profiling data for the hot code consume significant amounts of memory. Furthermore, cache generation incurs extra JIT compilation time. 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. 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. This thesis presents ShareJIT, a global code cache for JITs that shares 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. We also discuss policies to update and garbage-collect the global shared code cache and analyze the performance-critical parameters in sharing compiled code among inter-process methods. To evaluate ShareJIT, we tested 8 popular Android apps in a total of 30 experiments. ShareJIT improved overall performance by 9.24% on average, while decreasing memory consumption by 16.43% on average and JIT compilation time by 36.24% on average. At the system level, ShareJIT also reduced the number of retired instructions by an average of 7.64% and the number of CPU cache misses by an average of 10.39%.
Degree
thesis:*- Name thesis:degree_name
- Doctor of Philosophy
- Level thesis:degree_level
- Doctoral
- Discipline thesis:degree_discipline
- Engineering
- Department thesis:degree_department
- Computer Science
- Grantor
- Rice University
- Year dc:date.issued
- 2019
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Xu, Xiaoran
- Advisor dc:contributor.advisor
-
- Cooper, Keith D
Subjects
dc:subject × 3Rights
dc:rights- Statement dc:rights
-
- Copyright is held by the author, unless otherwise indicated. Permission to reuse, publish, or reproduce the work beyond the bounds of fair use or other exemptions to copyright law must be obtained from the copyright holder.
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Dc Identifier Citation
- Xu, Xiaoran. "ShareJIT: JIT Code Cache Sharing across Processes and Its Practical Implementation." (2019) Diss., Rice University. <a href="https://hdl.handle.net/1911/105972">https://hdl.handle.net/1911/105972</a>.