Font Size: a A A

Using Code Caching And Reusing To Improve Efficiency Of Android JIT Compiler

Posted on:2013-01-16Degree:MasterType:Thesis
Country:ChinaCandidate:B ZhouFull Text:PDF
GTID:2248330395450379Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
How to improve the efficiency of runtime system is one of the hot and difficult problems being worked on by computer researchers. As one typical runtime system, Java virtual machine (JVM) has been paid much attention for its good extensibility and portability. Recently, with the development of JIT compilation and parallel compilation techniques, JVM gains good improvement in its efficiency of program execution on PC and server platforms. However, those techniques bring little help for embedded JVMs due to the limitations of embedded systems. Finding methods to improve execution efficiency of Embedded JVMs becomes more and more important especially when Android becomes prevalent and begins to rock the world.JIT compilation technique is widely used to improve efficiency of JVMs. However, this method cannot be directly used on embedded JVMs as its high overhead. JIT compilers must try to reduce their detection latency and compilation latency. There are several solutions to reduce these latencies, but most are designed for PC and server platforms. For embedded JVMs, it requires new solutions and more research.This paper employs code caching and reusing technique to bring down overhead of JIT compilation system. On Dalvik, the runtime system of Android, we design and implement CCARF (Code Caching And Reusing Framework), which saves compiler-generated code to files and reduces compilation latency by reusing those files properly. With the reduction of compilation latency, method detection process is omitted and thus detection latency is eliminated. The core of CCARF is the design, management and reusing of position-independent code for Dalvik. It intends to make a real-world, effective and lightweight solution for caching and reusing executable code.This paper has the following contributions:1. It explored position dependencies in executable code generated by JVM JIT compilers, and analyzed their influence on position-independent code generation and code caching and reusing technique.2. It proposed new algorithms to eliminate different kinds of position dependencies in executable code, and implemented those algorithms in compiler code generator. Lightweight on-demand resolution and just-in-time resolution techniques are proposed to replace the traditional symbol table and dynamic linker based method.3. It analyzed and summarized effectiveness of different reusing policies on reducing latencies of JIT compilers, and implemented position-independent code manager to effectively utilize cached code.4. It designed experiments based on sophisticated SPECjvm98benchmarks, and evaluated CCARF from aspects of performance improvement, code expansion and cache size. Results showed that CCARF improved the performance of benchmarks by11.7%on average with a code expansion rate at6%.
Keywords/Search Tags:Code Caching, Code Reusing, JIT Compilation, Compilation Latency, Detection Latency
PDF Full Text Request
Related items