License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ECOOP.2017.30
URN: urn:nbn:de:0030-drops-72583
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2017/7258/
Zheng, Yudi ;
Bulej, LubomÃr ;
Binder, Walter
An Empirical Study on Deoptimization in the Graal Compiler
Abstract
Managed language platforms such as the Java Virtual Machine or the Common Language Runtime rely on a dynamic compiler to achieve high performance. Besides making optimization decisions based on the actual program execution and the underlying hardware platform, a dynamic compiler is also in an ideal position to perform speculative optimizations. However, these tend to increase the compilation costs, because unsuccessful speculations trigger deoptimization and recompilation of the affected parts of the program, wasting previous work. Even though speculative optimizations are widely used, the costs of these optimizations in terms of extra compilation work has not been previously studied. In this paper, we analyze the behavior of the Graal dynamic compiler integrated in Oracle's HotSpot Virtual Machine. We focus on situations which cause program execution to switch from machine code to the interpreter, and compare application performance using three different deoptimization strategies which influence the amount of extra compilation work done by Graal. Using an adaptive deoptimization strategy, we managed to improve the average start-up performance of benchmarks from the DaCapo, ScalaBench, and Octane benchmark suites, mostly by avoiding wasted compilation work. On a single-core system, we observed an average speed-up of 6.4% for the DaCapo and ScalaBench workloads, and a speed-up of 5.1% for the Octane workloads; the improvement decreases with an increasing number of available CPU cores. We also find that the choice of a deoptimization strategy has negligible impact on steady-state performance. This indicates that the cost of speculation matters mainly during start-up, where it can disturb the delicate balance between executing the program and the compiler, but is quickly amortized in steady state.
BibTeX - Entry
@InProceedings{zheng_et_al:LIPIcs:2017:7258,
author = {Yudi Zheng and Lubom{\'i}r Bulej and Walter Binder},
title = {{An Empirical Study on Deoptimization in the Graal Compiler}},
booktitle = {31st European Conference on Object-Oriented Programming (ECOOP 2017)},
pages = {30:1--30:30},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-035-4},
ISSN = {1868-8969},
year = {2017},
volume = {74},
editor = {Peter M{\"u}ller},
publisher = {Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
address = {Dagstuhl, Germany},
URL = {http://drops.dagstuhl.de/opus/volltexte/2017/7258},
URN = {urn:nbn:de:0030-drops-72583},
doi = {10.4230/LIPIcs.ECOOP.2017.30},
annote = {Keywords: dynamic compiler, profile-guided optimization, deoptimization}
}
Keywords: |
|
dynamic compiler, profile-guided optimization, deoptimization |
Collection: |
|
31st European Conference on Object-Oriented Programming (ECOOP 2017) |
Issue Date: |
|
2017 |
Date of publication: |
|
16.06.2017 |