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

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

  • Affiliations:
  • School of Electrical Engineering, Seoul National University, Seoul 151-742, Korea;-;-;-;-;-;-;-;-;School of Electrical Engineering, Seoul National University, Seoul 151-742, Korea

  • Venue:
  • ACM SIGARCH Computer Architecture News - Special issue on interaction between compilers and computer architectures
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

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 [1, 2, 3], 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 [4]. 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.