Sampling optimized code for type feedback
Sampling optimized code for type feedback
复制标题
为类型反馈采样优化代码
DOI:
10.1145/3426422.3426984
复制
发表时间:
2020
期刊:
影响因子:
--
通讯作者:
Vitek, Jan
中科院分区:
文献类型:
--
作者:
Flückiger, Olivier;Wälchli, Andreas;Krynski, Sebastián;Vitek, Jan
To efficiently execute dynamically typed languages, many language implementations have adopted a two-tier architecture. The first tier aims for low-latency startup times and collects dynamic profiles, such as the dynamic types of variables. The second tier provides high-throughput using an optimizing compiler that specializes code to the recorded type information. If the program behavior changes to the point that not previously seen types occur in specialized code, that specialized code becomes invalid, it is deoptimized, and control is transferred back to the first tier execution engine which will start specializing anew. However, if the program behavior becomes more specific, for instance, if a polymorphic variable becomes monomorphic, nothing changes. Once the program is running optimized code, there are no means to notice that an opportunity for optimization has been missed.We propose to employ a sampling-based profiler to monitor native code without any instrumentation. The absence of instrumentation means that when the profiler is not active, no overhead is incurred. We present an implementation is in the context of the Ř just-in-time, optimizing compiler for the R language. Based on the sampled profiles, we are able to detect when the native code produced by Ř is specialized for stale type feedback and recompile it to more type-specific code. We show that sampling adds an overhead of less than 3
登录
查看更多内容
影响因子:
--
作者:
Edd Barrett;Carl Friedrich Bolz-Tereick;Rebecca Killick;S. Mount;L. Tratt
通讯作者:
Edd Barrett;Carl Friedrich Bolz-Tereick;Rebecca Killick;S. Mount;L. Tratt
影响因子:
19
作者:
A. Gal;Brendan Eich;Mike Shaver;David Anderson;David Mandelin;M. Haghighat;Blake Kaplan;Graydon Hoare;B. Zbarsky;Jason Orendorff;J. Ruderman;Edwin W. Smith;Rick Reitmaier;Michael Bebenita;Mason Chang;M. Franz
通讯作者:
M. Franz
DOI:
10.1145/3359619.3359744
发表时间:
2019
期刊:
Proceedings of the 15th ACM SIGPLAN International Symposium on Dynamic Languages
影响因子:
--
作者:
O. Flückiger;Guido Chari;Jan Jecmen;Ming;Jakob Hain;J. Vitek
通讯作者:
J. Vitek
DOI:
10.21272/sec.2(2).13-18.2018
发表时间:
2018
期刊:
SocioEconomic Challenges
影响因子:
--
作者:
A. Trifu
通讯作者:
A. Trifu
DOI:
10.1145/178243.178478
发表时间:
1994
期刊:
SocioEconomic Challenges
影响因子:
--
作者:
Urs Hölzle;D. Ungar
通讯作者:
D. Ungar