节点文献
用代码缓存复用技术提升Android即时编译器效率
Using Code Caching and Reusing to Improve Efficiency of Android JIT Compiler
【摘要】 选择性编译能降低程序编译开销和生成代码的存储空间需求,但面临热方法检测延时和编译延时问题.现有降低这些延时的方法因需要复杂数据结构、算法或特殊硬件的支持而不适合嵌入式虚拟机平台.针对嵌入式平台,提出使用将可执行代码缓存至文件并按需复用的方法来降低这两种延时.为此,本文以Android系统虚拟机的即时编译器为基础,设计实现了轻量级的CCARF(Code Cache and Reuse Framework).CCARF为即时编译器设计了位置无关代码生成算法,使编译生成的代码不含位置依赖信息,从而保证代码可被正确复用;基于该算法,CCARF实现了一个代码管理器,高效地将位置无关代码缓存并复用.SPECjvm98基准测试集的测试结果表明,CCARF能在控制生成代码增长的前提下,平均提升基准测试程序性能约11%.
【Abstract】 Selective Compilation Policy is widely used in modern JIT compilers as it can reduce compilation overhead and the requirements for memory that stores the generated code.However,it still has to face two problems.First,hot method detection latency increases due to the stage-style policy.Second,compilation latency of methods still remains.To reduce hot method detection latency and compilation latency,we design and implement CCARF,a light-weighted position-independent code generating,caching and reusing framework.Based on prevalent Android operating system and its Dalvik VM,CCARF proposes a simple but effecient position-independent code generation algorithm,which makes the code generated reusable.The position-independent code is then efficiently cached to and reused from files.No hotness detection and compilation is needed as code can be loaded directly from cached files and thus those latencies get reduced.Experiment results show that CCARF can improve performance of SPECjvm98 benchmark programs by 11% on average while keeping code size expansion small.
【Key words】 JIT; detection latency; compilation latency; dalvik VM; code cache; code reuse;
- 【文献出处】 小型微型计算机系统 ,Journal of Chinese Computer Systems , 编辑部邮箱 ,2013年06期
- 【分类号】TP314
- 【被引频次】3
- 【下载频次】82