作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 体系结构与软件技术 • 上一篇    下一篇

基于Trace 合并和寄存器分配的Dalvik 优化

余超君,李春强,尚云海,张培勇   

  1. (浙江大学超大规模集成电路设计研究所,杭州310027)
  • 收稿日期:2013-09-13 出版日期:2014-10-15 发布日期:2014-10-13
  • 作者简介:余超君(1989 - ),男,硕士,主研方向:虚拟机技术与应用;李春强、尚云海,硕士;张培勇,副教授、博士。
  • 基金资助:
    国家自然科学基金资助项目(61204111);“核高基”重大专项(2010ZX01030-001-001-002)。

Optimization of Dalvik Based on Trace-combination and Register Allocation

YU Chao-jun,LI Chun-qiang,SHANG Yun-hai,ZHANG Pei-yong   

  1. (Institute of VLSI Design,Zhejiang University,Hangzhou 310027,China)
  • Received:2013-09-13 Online:2014-10-15 Published:2014-10-13

摘要: Dalvik 虚拟机作为Android 系统上运行所有应用程序的基础,其性能瓶颈一直制约着Android 系统的用户体验。通过研究Android 系统中的Dalvik 架构,分析其解释器和JIT 模块的工作原理,发现热Trace 选择过程中短Trace编译损耗大以及即时编译过程中寄存器分配不合理的情况。结合Java 虚拟机技术和编译器技术,在现有热Trace 选择和寄存器分配机制的基础上,提出基于Trace 合并和寄存器分配的优化算法,在国产高性能嵌入式CPU CSKY 体系下移植Dalvik 虚拟机并实现了上述优化算法。通过实验证明优化后Dalvik 执行Java 程序的性能提高了近10% 。

关键词: Dalvik 虚拟机, JIT 技术, 性能优化, Trace 合并, 寄存器分配, 生命周期

Abstract: As the basics of running application on Android system,performance of Dalvik virtual machine restricts the Android’s user experience. By researching Dalvik architecture in the Android system and analyzing some key techniques of the interpreter and Just in Time(JIT) module,it finds that short Trace’s compiler dissipation is large and there are some irrational situations on register allocation in JIT. Combining nowadays JVM technology with modern compiler technology,and based on the Trace selection strategy and register allocation mechanism of Dalvik,this paper proposes algorithms of combining Trace and optimizing strategy of register allocation. These algorithms are implemented in high performance embedded CPU CSKY architecture. The experiments prove that this Dalvik can improve the performance by about 10% .

Key words: Dalvik virtual machine, Just in Time (JIT) technology, performance optimization, Trace-combination, register allocation, life cycle

中图分类号: