Cargando…
Context-sensitive trace inlining for Java()
Method inlining is one of the most important optimizations in method-based just-in-time (JIT) compilers. It widens the compilation scope and therefore allows optimizing multiple methods as a whole, which increases the performance. However, if method inlining is used too frequently, the compilation t...
Autores principales: | , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
Elsevier Science
2013
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4872537/ https://www.ncbi.nlm.nih.gov/pubmed/27239163 http://dx.doi.org/10.1016/j.cl.2013.04.002 |
_version_ | 1782432745853550592 |
---|---|
author | Häubl, Christian Wimmer, Christian Mössenböck, Hanspeter |
author_facet | Häubl, Christian Wimmer, Christian Mössenböck, Hanspeter |
author_sort | Häubl, Christian |
collection | PubMed |
description | Method inlining is one of the most important optimizations in method-based just-in-time (JIT) compilers. It widens the compilation scope and therefore allows optimizing multiple methods as a whole, which increases the performance. However, if method inlining is used too frequently, the compilation time increases and too much machine code is generated. This has negative effects on the performance. Trace-based JIT compilers only compile frequently executed paths, so-called traces, instead of whole methods. This may result in faster compilation, less generated machine code, and better optimized machine code. In the previous work, we implemented a trace recording infrastructure and a trace-based compiler for [Formula: see text] , by modifying the Java HotSpot VM. Based on this work, we evaluate the effect of trace inlining on the performance and the amount of generated machine code. Trace inlining has several major advantages when compared to method inlining. First, trace inlining is more selective than method inlining, because only frequently executed paths are inlined. Second, the recorded traces may capture information about virtual calls, which simplify inlining. A third advantage is that trace information is context sensitive so that different method parts can be inlined depending on the specific call site. These advantages allow more aggressive inlining while the amount of generated machine code is still reasonable. We evaluate several inlining heuristics on the benchmark suites DaCapo 9.12 Bach, SPECjbb2005, and SPECjvm2008 and show that our trace-based compiler achieves an up to 51% higher peak performance than the method-based Java HotSpot client compiler. Furthermore, we show that the large compilation scope of our trace-based compiler has a positive effect on other compiler optimizations such as constant folding or null check elimination. |
format | Online Article Text |
id | pubmed-4872537 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2013 |
publisher | Elsevier Science |
record_format | MEDLINE/PubMed |
spelling | pubmed-48725372016-05-27 Context-sensitive trace inlining for Java() Häubl, Christian Wimmer, Christian Mössenböck, Hanspeter Comput Lang Syst Struct Article Method inlining is one of the most important optimizations in method-based just-in-time (JIT) compilers. It widens the compilation scope and therefore allows optimizing multiple methods as a whole, which increases the performance. However, if method inlining is used too frequently, the compilation time increases and too much machine code is generated. This has negative effects on the performance. Trace-based JIT compilers only compile frequently executed paths, so-called traces, instead of whole methods. This may result in faster compilation, less generated machine code, and better optimized machine code. In the previous work, we implemented a trace recording infrastructure and a trace-based compiler for [Formula: see text] , by modifying the Java HotSpot VM. Based on this work, we evaluate the effect of trace inlining on the performance and the amount of generated machine code. Trace inlining has several major advantages when compared to method inlining. First, trace inlining is more selective than method inlining, because only frequently executed paths are inlined. Second, the recorded traces may capture information about virtual calls, which simplify inlining. A third advantage is that trace information is context sensitive so that different method parts can be inlined depending on the specific call site. These advantages allow more aggressive inlining while the amount of generated machine code is still reasonable. We evaluate several inlining heuristics on the benchmark suites DaCapo 9.12 Bach, SPECjbb2005, and SPECjvm2008 and show that our trace-based compiler achieves an up to 51% higher peak performance than the method-based Java HotSpot client compiler. Furthermore, we show that the large compilation scope of our trace-based compiler has a positive effect on other compiler optimizations such as constant folding or null check elimination. Elsevier Science 2013-12 /pmc/articles/PMC4872537/ /pubmed/27239163 http://dx.doi.org/10.1016/j.cl.2013.04.002 Text en © 2013 The Authors https://creativecommons.org/licenses/by/3.0/This is an open access article under the CC BY license (https://creativecommons.org/licenses/by/3.0/). |
spellingShingle | Article Häubl, Christian Wimmer, Christian Mössenböck, Hanspeter Context-sensitive trace inlining for Java() |
title | Context-sensitive trace inlining for Java() |
title_full | Context-sensitive trace inlining for Java() |
title_fullStr | Context-sensitive trace inlining for Java() |
title_full_unstemmed | Context-sensitive trace inlining for Java() |
title_short | Context-sensitive trace inlining for Java() |
title_sort | context-sensitive trace inlining for java() |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4872537/ https://www.ncbi.nlm.nih.gov/pubmed/27239163 http://dx.doi.org/10.1016/j.cl.2013.04.002 |
work_keys_str_mv | AT haublchristian contextsensitivetraceinliningforjava AT wimmerchristian contextsensitivetraceinliningforjava AT mossenbockhanspeter contextsensitivetraceinliningforjava |