Deoptimization for dynamic language JITs on typed, stack-based virtual machines

Deoptimization for dynamic language JITs on typed, stack-based virtual machines
复制标题

类型化、基于堆栈的虚拟机上动态语言 JIT 的去优化

DOI:
10.1145/2576195.2576209
复制
发表时间:
2014
期刊:
International Symposium on Code Generation and Optimization, 2003. CGO 2003.
影响因子:
--
通讯作者:
B. Hardekopf
B. Hardekopf
中科院分区:
--
文献类型:
--
作者:
Madhukar N. Kedlaya;Behnam Robatmili;Calin Cascaval;B. Hardekopf

文献摘要

被引文献

相似文献

我们有兴趣在语言级虚拟机上实现动态语言运行时间。类型专业化是对动态语言运行时间的关键优化:处理任何类型数据的通用代码都被执行过程中观察到的特定类型的专用代码替换。但是,类型可以改变,并且在遇到意外类型时必须恢复运行时。最新的恢复机制称为Deoptimization。 Deoptimization是一种以低级语言实现的动态语言运行时间的知名技术。但是,在虚拟机上没有实现的动态语言运行时,例如通用语言运行时(CLR)或Java Virtual Machine(JVM)使用DeOpimization,因为不可能以低级语言使用其实现。 在本文中,我们提出了一种新颖的技术,该技术能够为在基于堆栈的虚拟机上实现的动态语言运行时间进行除法。我们的技术不需要对基础虚拟机的任何更改。我们在JavaScript语言实现MCJS中实现了建议的技术,该技术在单声道运行时(CLR)之外运行。我们根据MCJ和Ironjs中实现的虚拟机制运行时的当前最新恢复机制评估了我们的实现。我们表明,即使是在虚拟机上运行的运行时间,DeOptimization也可以提供显着的性能优势。
We are interested in implementing dynamic language runtimes on top of language-level virtual machines. Type specialization is a critical optimization for dynamic language runtimes: generic code that handles any type of data is replaced with specialized code for particular types observed during execution. However, types can change, and the runtime must recover whenever unexpected types are encountered. The state-of-the-art recovery mechanism is called deoptimization. Deoptimization is a well-known technique for dynamic language runtimes implemented in low-level languages like C. However, no dynamic language runtime implemented on top of a virtual machine such as the Common Language Runtime (CLR) or the Java Virtual Machine (JVM) uses deoptimization, because the implementation thereof used in low-level languages is not possible. In this paper we propose a novel technique that enables deoptimization for dynamic language runtimes implemented on top of typed, stack-based virtual machines. Our technique does not require any changes to the underlying virtual machine. We implement our proposed technique in a JavaScript language implementation, MCJS, running on top of the Mono runtime (CLR). We evaluate our implementation against the current state-of-the-art recovery mechanism for virtual machine-based runtimes, as implemented both in MCJS and in IronJS. We show that deoptimization provides significant performance benefits, even for runtimes running on top of a virtual machine.