计算机工程
計算機工程
계산궤공정
COMPUTER ENGINEERING
2014年
10期
61-65,70
,共6页
余超君%李春强%尚云海%张培勇
餘超君%李春彊%尚雲海%張培勇
여초군%리춘강%상운해%장배용
Dalvik虚拟机%JIT技术%性能优化%Trace合并%寄存器分配%生命周期
Dalvik虛擬機%JIT技術%性能優化%Trace閤併%寄存器分配%生命週期
Dalvik허의궤%JIT기술%성능우화%Trace합병%기존기분배%생명주기
Dalvik virtual machine%Just in Time ( JIT ) technology%performance optimization%Trace-combination%register allocation%life cycle
Dalvik虚拟机作为Android系统上运行所有应用程序的基础,其性能瓶颈一直制约着Android系统的用户体验。通过研究Android系统中的Dalvik架构,分析其解释器和JIT模块的工作原理,发现热Trace选择过程中短Trace编译损耗大以及即时编译过程中寄存器分配不合理的情况。结合Java虚拟机技术和编译器技术,在现有热Trace选择和寄存器分配机制的基础上,提出基于Trace合并和寄存器分配的优化算法,在国产高性能嵌入式CPU CSKY体系下移植Dalvik虚拟机并实现了上述优化算法。通过实验证明优化后Dalvik执行Java程序的性能提高了近10%。
Dalvik虛擬機作為Android繫統上運行所有應用程序的基礎,其性能瓶頸一直製約著Android繫統的用戶體驗。通過研究Android繫統中的Dalvik架構,分析其解釋器和JIT模塊的工作原理,髮現熱Trace選擇過程中短Trace編譯損耗大以及即時編譯過程中寄存器分配不閤理的情況。結閤Java虛擬機技術和編譯器技術,在現有熱Trace選擇和寄存器分配機製的基礎上,提齣基于Trace閤併和寄存器分配的優化算法,在國產高性能嵌入式CPU CSKY體繫下移植Dalvik虛擬機併實現瞭上述優化算法。通過實驗證明優化後Dalvik執行Java程序的性能提高瞭近10%。
Dalvik허의궤작위Android계통상운행소유응용정서적기출,기성능병경일직제약착Android계통적용호체험。통과연구Android계통중적Dalvik가구,분석기해석기화JIT모괴적공작원리,발현열Trace선택과정중단Trace편역손모대이급즉시편역과정중기존기분배불합리적정황。결합Java허의궤기술화편역기기술,재현유열Trace선택화기존기분배궤제적기출상,제출기우Trace합병화기존기분배적우화산법,재국산고성능감입식CPU CSKY체계하이식Dalvik허의궤병실현료상술우화산법。통과실험증명우화후Dalvik집행Java정서적성능제고료근10%。
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%.