用代码缓存复用技术提升Android即时编译器效率  被引量:1

Using Code Caching and Reusing to Improve Efficiency of Android JIT Compiler

在线阅读下载全文

作  者:周波[1] 张源[1] 杨珉[1] 周曦[1] 

机构地区:[1]复旦大学软件学院,上海201203

出  处:《小型微型计算机系统》2013年第6期1307-1312,共6页Journal of Chinese Computer Systems

基  金:核高基重大专项项目(2009ZX01036-001-003)资助

摘  要:选择性编译能降低程序编译开销和生成代码的存储空间需求,但面临热方法检测延时和编译延时问题.现有降低这些延时的方法因需要复杂数据结构、算法或特殊硬件的支持而不适合嵌入式虚拟机平台.针对嵌入式平台,提出使用将可执行代码缓存至文件并按需复用的方法来降低这两种延时.为此,本文以Android系统虚拟机的即时编译器为基础,设计实现了轻量级的CCARF(Code Cache and Reuse Framework).CCARF为即时编译器设计了位置无关代码生成算法,使编译生成的代码不含位置依赖信息,从而保证代码可被正确复用;基于该算法,CCARF实现了一个代码管理器,高效地将位置无关代码缓存并复用.SPECjvm98基准测试集的测试结果表明,CCARF能在控制生成代码增长的前提下,平均提升基准测试程序性能约11%.Selective Compilation Policy is widely used in modem JIT compilers as it can reduce compilation overhead and the require- ments for memory that stores the generated code. However, it still has to face two problems. First, hot method detection latency in- creases 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 reu- sing 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.

关 键 词:即时编译器 检测延时 编译延时 DALVIK虚拟机 JIT代码缓存 JIT代码复用 

分 类 号:TP314[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象