PAYJIT: space-optimal JIT compilation and its practical implementation

PAYJIT: space-optimal JIT compilation and its practical implementation
复制标题

PAYJIT:空间优化的JIT编译及其实际实现

DOI:
10.1145/3178372.3179523
复制
发表时间:
2018
期刊:
CC 2018
影响因子:
--
通讯作者:
Zhang, Yan
Zhang, Yan
中科院分区:
--
文献类型:
--
作者:
Brock, Jacob;Ding, Chen;Xu, Xiaoran;Zhang, Yan

文献摘要

参考文献

被引文献

相似文献

动态编程语言中的即时(JIT)编译可以提高具有热段的代码的执行速度。然而,这样做的代价是增加了用于存储编译代码和相关簿记数据的内存使用,以及增加了热代码的预先编译时间。当前标准的JIT编译策略(在Android的JIT编译器和HotSpot Java编译器中都使用)过于简单;根据调用和循环迭代的计数,任何达到一定热度的方法都将被安排进行编译。如果编译的成本/收益对于给定热度的每个方法都是相同的,那么这将是很好的,但事实并非如此。事实上,与编译一个较小的、同样热门的方法相比,编译一个较大的方法可能会导致更少的总体加速。这暴露了改进的机会。我们为基于方法的JIT编译器提出了PAYJIT编译策略,该策略根据方法大小缩放编译热度阈值,并包含两点调优,这是一种确定这些热度阈值的机制。通过这种方式,PAYJIT编译了更多的小方法,它更快地编译了它们,并且几乎消除了对整体加速贡献不大的大方法的编译。在16个实验测试的10个受欢迎的Android应用程序中,PAYJIT编译策略最多减少了49.2%的编译时间,平均减少了18.7%;执行时间最多减少10.9%,平均减少1.34%(几何平均加速率为1.46%);而代码缓存大小最大减少41.1%,平均减少15.6%。
Just-in-time (JIT) compilation in dynamic programming languages can improve execution speed in code with hot sections. However, that comes at the cost of increased memory usage for the storage of compiled code and associated bookkeeping data, as well as up-front compilation time for the hot code.The current standard JIT compilation policy (used in both Android's JIT compiler and the HotSpot Java compiler) is simplistic; any method that has reached a certain hotness, as counted by invocations and loop iterations, is scheduled for compilation. This would be fine if the cost/benefit of compilation was the same for every method of a given hotness, but that is not the case. In fact, compiling a large method will likely result in less overall speedup than compiling a smaller, equally hot method. This exposes an opportunity for improvement. We propose the PAYJIT compilation policy for method-based JIT compilers, which scales compilation hotness thresholds with method sizes, and includes two-point tuning, a mechanism for determining those hotness thresholds. In this way, PAYJIT compiles more small methods, it compiles them sooner, and it nearly eliminates the compilation of large methods that contribute little to overall speedup.Among 10 popular Android apps tested across 16 experiments, the PAYJIT compilation policy decreases compilation time by a maximum of 49.2%, with an average of 18.7%; execution time by a maximum of 10.9%, with an average of 1.34% (for a geometric mean speedup of 1.46%); and code cache size by a maximum of 41.1%, with an average of 15.6%.
DOI: 10.1145/1141277.1141488
发表时间: 2006-04
期刊: Proceedings of the 2006 ACM symposium on Applied computing
影响因子: --
作者:
G. Agosta;S. Crespi-Reghizzi;P. Palumbo;M. Sykora
通讯作者: G. Agosta;S. Crespi-Reghizzi;P. Palumbo;M. Sykora
DOI: 10.1145/1094811.1094835
发表时间: 2005-10
期刊: --
影响因子: --
作者:
Matthew Arnold;Adam Welc;V. T. Rajan
通讯作者: Matthew Arnold;Adam Welc;V. T. Rajan
托管语言虚拟机中的代码缓存管理可减少嵌入式系统的内存消耗
DOI: --
发表时间: 2016
期刊: ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems
影响因子: --
作者:
Forrest J. Robinson;Michael R. Jantz;P. Kulkarni
通讯作者: P. Kulkarni
CAOS:动态编译系统的在线筛选与分析相结合
DOI: --
发表时间: 2016
期刊: Conf. Computing Frontiers
影响因子: --
作者:
Jie Fu;Guojie Jin;Longbing Zhang;Jian Wang
通讯作者: Jian Wang
基于跟踪的 Java JIT 编译器中的自适应多级编译
DOI: --
发表时间: 2012
期刊: Conference on Object-Oriented Programming Systems, Languages, and Applications
影响因子: --
作者:
H. Inoue;H. Hayashizaki;Peng Wu;T. Nakatani
通讯作者: T. Nakatani