Reducing virtual call overheads in a Java VM just-in-time compiler

Author: 
Junpyo Lee
Author: 
Byung-Sun Yang
Author: 
Suhyun Kim
Author: 
Kemal Ebcioğlu
Author: 
Erik Altman
Author: 
Seungil Lee
Author: 
Yoo C. Chung
Author: 
Heungbok Lee
Author: 
Je Hyung Lee
Author: 
Soo-Mook Moon
Abstract: 

Java, an object-oriented language, uses virtual methods to support the extension and reuse of classes. Unfortunately, virtual method calls affect performance and thus require an efficient implementation, especially when just-in-time (JIT) compilation is done. Inline caches and type feedback are solutions used by compilers for dynamically-typed object-oriented languages such as SELF, where virtual call overheads are much more critical to performance than in Java. With an inline cache, a virtual call that would otherwise have been translated into an indirect jump with two loads is translated into a simpler direct jump with a single compare. With type feedback combined with adaptive compilation, virtual methods can be inlined using checking code which verifies if the target method is equal to the inlined one. This paper evaluates the performance impact of these techniques in an actual Java virtual machine, which is our new open source Java VM JIT compiler called LaTTe. We also discuss the engineering issues in implementing these techniques. Our experimental results with the SPECjvm98 benchhmarks indicate that while monomoprhic inline caches and polymorphic inline caches achieve a speedup as much as a geometric mean of 3% and 9% respectively, type feedback cannot improve further over polymorphic inline caches and even degrades the performance for some programs.

Citation: 
Junpyo Lee, Byung-Sun Yang, Suhyun Kim, Seungil Lee, Yoo C. Chung, Heungbok Lee, Je Hyung Lee, Soo-Mook Moon, Kemal Ebcioğlu, and Erik Altman. Reducing virtual call overheads in a Java VM just-in-time compiler. ACM SIGARCH Computer Architecture News, 28(1):21–33, March 2000.
DOI: 
10.1145/346023.346037
Publication date: 
March, 2000