Compilation queuing and graph caching for dynamic compilers

  • Authors:
  • Lukas Stadler;Gilles Duboscq;Hanspeter Mössenböck;Thomas Würthinger

  • Affiliations:
  • Johannes Kepler University, Linz, Austria;Johannes Kepler University, Linz, Austria;Johannes Kepler University, Linz, Austria;Oracle Labs, Linz, Austria

  • Venue:
  • Proceedings of the sixth ACM workshop on Virtual machines and intermediate languages
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Modern virtual machines for Java use a dynamic compiler to optimize the program at run time. The compilation time therefore impacts the performance of the application in two ways: First, the compilation and the program's execution compete for CPU resources. Second, the sooner the compilation of a method finishes, the sooner the method will execute faster. In this paper, we present two strategies for mitigating the performance impact of a dynamic compiler. We introduce and evaluate a way to cache, reuse and, at the right time, evict the compiler's intermediate graph representation. This allows reuse of this graph when a method is inlined multiple times into other methods. We show that the combination of late inlining and graph caching is highly effective by evaluating the cache hit rate for several benchmarks. Additionally, we present a new mechanism for optimizing the order in which methods get compiled. We use a priority queue in order to make sure that the compiler processes the hottest methods of the program first. The machine code for hot methods is available earlier, which has a significant impact on the first benchmark. Our results show that our techniques can significantly improve the start up performance of Java applications. The techniques are applicable to dynamic compilers for managed languages.