Browse > Article

Early Null Pointer Check using Predication in Java Just-In-Time Compilation  

Lee Sanggyu (삼성전자 S/W센터)
Choi Hyug-Kyu (서울대학교 전기공학부)
Moon Soo-Mook (서울대학교 전기공학부)
Abstract
Java specification states that all accesses to an object must be checked at runtime if object refers to null. Since Java is an object-oriented language, object accesses are frequent enough to make null pointer checks affect the performance significantly. In order to reduce the performance degradation, there have been attempts to remove redundant null pointer checks. For example, in a Java environment where a just-in-time (JIT) compiler is used, the JIT compiler removes redundant null pointer check code via code analysis. This paper proposes a technique to remove additional null pointer check code that could not be removed by previous JIT compilation techniques, via early null pointer check using an architectural feature called predication. Generally, null point check code consists of two instructions: a compare and a branch. Our idea is moving the compare instruction that is usually located just before an use of an object, to the point right after the object is defined so that the total number of compare instructions is reduced. This results in reduction of dynamic and static compare instructions by 3.21$\%$ and 1.98$\%$. respectively, in SPECjvm98 bechmarks, compared to the code that has already been optimized by previous null pointer check elimination techniques. Its performance impact on an Itanium machine is an improvement of 0.32$\%$.
Keywords
Java virtual machine; Just-in-Time compiler; null pointer check elimination; predication;
Citations & Related Records
연도 인용수 순위
  • Reference
1 Suhyun Kim, Soo-Mook Moon, Kemal Ebcioglu and Erik Altman, 'VLaTTe: A Java Just-in-Time Compiler for VLIW with Fast Scheduling and Register Allocation,' IEICE Transactions on Information and Systems, Vol. E87-D, No.7, pp. 1712-1720, July, 2004
2 GNU Classpath, http://www.gnu.org/software/ classpath/classpath.html
3 J. R. Allen, K. Kennedy, C. Porterfield, and J. Warren, 'Conversion of control dependence to data dependence,' Proc. 10th ACM Symp. Principles of Programming languages, pp. 177-189, January 1983   DOI
4 J. Whaley, Dynamic optimization through the use of automatic runtime specialization, Massachusetts Institute of Technology, May 1999
5 Standard Performance Evaluation Corp, 'SPEC JVM98 Benchmarks,' http://www.spec.org/osg/jvm98/
6 Motohiro Kawahito, Hideaki Komatsu Toshio, and Nakatani, 'Effective Null Pointer Check Elimination Utilizing Hardware Trap,' November 2000
7 A. V. Aho, R. Sethi, and J. D. Ullman, 'Compilers, Principles, Techniques and Tools,' Addison-Wesley, Reading, MA, January 1986
8 Intel Corporation. 'Open Runtime Platform (ORP),' http://orp.sourceforge.net
9 S. S. Muchnick, 'Advanced Compiler Design and Implementation,' Morgan Kaufmann Publishers, San Francisco, CA, 1997
10 E. Morel and C. Renvoise, 'Global optimization by suppression of partial redundancies,' Communications of the ACM, Vol. 22, No.2, pp. 96-103, February 1979   DOI   ScienceOn
11 Sun Microsystems, UltraSPARC Ill Cu User's Manual version 2.0, February 2003
12 James Gosling, and Henry McGilton, The Java Language Environment. A White Paper, http:// java.sun.com/docs/white/langenv/, May 1996
13 Tim Lindholm, and Frank Yellin, The Java Virtual Machine Specification, Second Edition, http://java.sun.com/docs/books/vmspec/2nd-edition/ html/VMSpecTOC.doc.html, April 1999
14 James Gosling, Bill Joy, Guy Steele, and Gilad Bracha, The Java Language Specification, Second Edition, http://java.sun.com/docs/books/jls/second_ edition/html/j.title.doc.html , June 2000
15 PA-RISC 2.0 Instruction set architecture, Hewlett-Packard, August 1995
16 ARM, ARM Developer guide version 1.0, October 1999
17 Intel Itanium Architecture Software Developer's Manual Vol. 1: Itanium Application Architecture. http://developer.intel.com/design/itanium/manuals.htm