Optimization of dynamic languages using hierarchical layering of virtual machines

Optimization of dynamic languages using hierarchical layering of virtual machines
复制标题

使用虚拟机分层优化动态语言

DOI:
--
复制
发表时间:
2009
期刊:
Dynamic Languages Symposium
影响因子:
--
通讯作者:
M. Franz
M. Franz
中科院分区:
--
文献类型:
--
作者:
Alexander Yermolovich;Christian Wimmer;M. Franz

文献摘要

被引文献

相似文献

创建解释器是实现动态编程语言的一种简单而快速的方法。这种轻松也带来了主要的缺点。解释器比编译的机器码慢得多,因为它们有很高的调度开销,并且不能执行优化。为了克服这些限制,解释器通常与即时编译器相结合,以提高整体性能。然而,这意味着必须为每种语言实现即时编译器。 我们探索的方法,采取一个动态语言的解释器,并运行在一个优化的基于跟踪的虚拟机,即,我们在主机VM上运行来宾VM。主机VM使用跟踪记录来观察执行应用程序的客户VM。每个记录的跟踪表示对应于通过应用程序的给定执行路径的客户VM字节码的序列。主机VM优化这些跟踪并将其编译为机器代码,从而消除了对客户机VM的自定义即时编译器的需要。客户VM只需要向主机VM提供有关其解释器循环的基本信息。
Creating an interpreter is a simple and fast way to implement a dynamic programming language. With this ease also come major drawbacks. Interpreters are significantly slower than compiled machine code because they have a high dispatch overhead and cannot perform optimizations. To overcome these limitations, interpreters are commonly combined with just-in-time compilers to improve the overall performance. However, this means that a just-in-time compiler has to be implemented for each language. We explore the approach of taking an interpreter of a dynamic language and running it on top of an optimizing trace-based virtual machine, i.e., we run a guest VM on top of a host VM. The host VM uses trace recording to observe the guest VM executing the application program. Each recorded trace represents a sequence of guest VM bytecodes corresponding to a given execution path through the application program. The host VM optimizes and compiles these traces to machine code, thus eliminating the need for a custom just-in-time compiler for the guest VM. The guest VM only needs to provide basic information about its interpreter loop to the host VM.