北京航空航天大学学报 ›› 2006, Vol. 32 ›› Issue (03): 352-356.

• 论文 • 上一篇    下一篇

Java虚拟机中动态内联策略的改进

周晶, 王雷, 刘志成   

  1. 北京航空航天大学 计算机学院, 北京 100083
  • 收稿日期:2005-03-25 出版日期:2006-03-31 发布日期:2010-09-20
  • 作者简介:周 晶(1981-),男,北京人,硕士生, anderszhj@163.com.
  • 基金资助:

    英特尔中国研究中心(ICRC)基金资助项目

Dynamic inlining scheme improvement in JVM

Zhou Jing, Wang Lei, Liu Zhicheng   

  1. School of Computer Science and Technology, Beijing University of Aeronautics and Astronautics, Beijing 100083, China
  • Received:2005-03-25 Online:2006-03-31 Published:2010-09-20

摘要: 在Java虚拟机中,传统的基于计数的热点探测方法往往不能得到方法间的调用关系,因此,采用这种机制的动态编译器会丧失一些优化机会,比如方法内联.提出了基于在线反馈信息的动态内联策略.同已有的内联算法相比,该方法引入了BC Map,它由基线编译器对方法进行第一次编译时构建.BC Map可以确定对方法M进行调用的字节码在其调用者中的索引.通过构建Guarded Rec记录,编译器能够准确判断出虚方法的接收者对象的类型,进而确定方法间的调用关系.使用该信息指导的保护内联优化可以避免静态判断虚方法的接收者对象类型的缺陷,得到更加准确的动态信息,使应用程序的性能得到提升.

Abstract: In the Java virtual machine(JVM), traditional counter-based hotspot-detecting method usually can not get the caller-callee relationship, therefore, the dynamic compiler which applied this scheme would lose some optimization opportunities, such as method inlining. A dynamic inlining scheme based on online feedback information was proposed. Compared with the algorithms presented, the new method introduced BC Map, it was constructed by the baseline compiler when a method was compiled for the first time. BC Map can identify the index of the bytecode that invoked method M in its caller. With constructing Guarded Rec record, the compiler can get the type of virtual method’s receiver object correctly, and then identify the relationship between caller and callee. The guarded inlining guided by this information can avoid identifying the type of virtual method’s receiver object statically, get the dynamic information more precisely, and then it can increase applications’ performance.

中图分类号: 


版权所有 © 《北京航空航天大学学报》编辑部
通讯地址:北京市海淀区学院路37号 北京航空航天大学学报编辑部 邮编:100191 E-mail:jbuaa@buaa.edu.cn
本系统由北京玛格泰克科技发展有限公司设计开发