Dynamic inlining scheme improvement in JVM
-
摘要: 在Java虚拟机中,传统的基于计数的热点探测方法往往不能得到方法间的调用关系,因此,采用这种机制的动态编译器会丧失一些优化机会,比如方法内联.提出了基于在线反馈信息的动态内联策略.同已有的内联算法相比,该方法引入了BC Map,它由基线编译器对方法进行第一次编译时构建.BC Map可以确定对方法M进行调用的字节码在其调用者中的索引.通过构建Guarded Rec记录,编译器能够准确判断出虚方法的接收者对象的类型,进而确定方法间的调用关系.使用该信息指导的保护内联优化可以避免静态判断虚方法的接收者对象类型的缺陷,得到更加准确的动态信息,使应用程序的性能得到提升.
-
关键词:
- Java 程序设计语言 /
- 编译程序 /
- 优化
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.-
Key words:
- Java programming language /
- program compilers /
- optimization
-
[1] Gosling J, Joy B, Steele G. The Java language specification[M]. MA:Addison Wesley, 1996 [2] Ayers A, Gottlieb R, Schooler R. Aggressive inlining . Proceedings of the ACM SIGPLAN 1997 Conference on Programming Language Design and Implementation . New York:ACM Press, 1997.134~145 [3] Cierniak M, Lueh G Y, Stichnoth J M. Practicing JUDO:Java under dynamic optimizations . ACM SIGPLAN Notices . New York:ACM Press, 2000.13~26 [4] Detlef D, Agesen O. Inlining of virtual methods . Proceedings of the 13th European Conference on Object-Oriented Programming . London:Springer-Verlag, 1999.258~278 [5] Sun Cop.The Java HotSpot virtual machine,v1.4.1 .http://Java.sun.com/products/hotspot/docs/whitepaper/Java Hotspot v1.4.1/Java HSpot WP v1.4.1 1002 1.html,2002-09/2005-03 [6] Burke M G, Choi J D, Fink S, %et al%. The Jalapeo dynamic optimization compiler for Java . Proceedings ACM 1999 Java Grande Conference . New York:ACM Press, 1999 [7] Holzle U, Ungar D. Reconciling responsiveness with performance in pure object-oriented languages[J]. ACM Transactions on Programming Languages and Systems, 1996,18:355~400 [8] Cierniak M, Eng M, Glew N, %et al%. The open runtime platform:a flexible high-performance managed runtime environment[J]. Intel Technology Journal, 2003, 7(1):5~18 [9] Suganuma T, Ogasawara T, Takeuchi M, %et al%.Overview of the IBM Java just-in-time compiler[J]. IBM Systems Journal, 2000, 39(1):175~193
点击查看大图
计量
- 文章访问数: 3132
- HTML全文浏览量: 172
- PDF下载量: 714
- 被引次数: 0