HAMLET: Hardware Enabled Meta-Tracing (ext.)
HAMLET: Hardware Enabled Meta-Tracing (ext.)
批准号:
EP/S020861/1
负责人:
Laurence Tratt
金额:
$117.61万
依托单位:
依托单位国家:
英国
项目类别:
Fellowship
财政年份:
2019
资助国家:
英国
项目状态:
已结题
起止时间:
2019 至 --
中文摘要
随着我们的软件系统在规模和复杂性上的增长,越来越多样化的用户对他们的语言有不同的需求:统计学家(例如R)的正确语言不同于正式验证安全属性的人(例如OCaml)的语言,这又不同于创建面向用户的应用程序的人(例如Javascript)。然而,不同的语言居住在不同的筒仓中,它们之间的互动是粗糙而缓慢的。语言组合一直被吹捧为这个问题的解决方案,它允许语言以一种细粒度的方式一起使用,但传统上一直难以实现这一承诺。在讲座奖学金中,我和我的团队展示了大型的、混乱的、真实世界的语言可以组合在一起,甚至允许不同的语言在一行代码中混合在一起。我们能够使这些多语言程序的性能接近它们的单语言组件,这表明语言组合的承诺是真实的。然而,在这项研究的过程中,一个意想不到的问题变得明显:虚拟机(vm),用于使许多语言快速运行的系统(这对语言组合的良好性能至关重要),并没有像预期的那样运行。在迄今为止最大的VM实验中,我们发现VM在大约60%的情况下运行不正确。修复现有虚拟机的尝试大部分都失败了,因为这些问题根深蒂固,即使经过仔细检查也无法梳理出来。这是语言合成的一个重要问题,而虚拟机是语言合成的基础支柱。因此,该研究扩展旨在表明vm可以具有良好的、可预测的性能,并且它们是语言组合的合适基础支柱。然而,我们不能期望创建一个传统的VM,这通常会消耗数十、数百或数千人年的工作。相反,我和我的团队将创建一个新的元跟踪VM系统,因为历史表明,这些系统可以在少数人的时间内创建。对我们来说幸运的是,元跟踪也被证明是运行多语言程序的最快方式,所以它是一个自然的选择。我们将严格地对我们创建的新的元跟踪系统进行基准测试,从一开始到整个开发过程。这将使我们能够在性能退化发生后很快观察到它们,从而使我们能够快速修复它们。我们还将利用这个机会来解决元跟踪最大的弱点之一:它的缓慢预热,即程序启动和jit编译完成之间的时间。当前的跟踪涉及到一个软件解释器(解释一个软件解释器),当执行循环时,开销会增加100-200倍。我们将使用最新x86芯片中的处理器跟踪(Processor Trace, PT)特性,将元跟踪的软件部分转移到硬件中,为系统的这一关键阶段提供大约100倍的速度提升。这也将使我们能够更积极地优化目前导致预热不良的示踪器的其他部分。在这个奖学金扩展项目结束时,除了传统的研究论文外,我们还将发布一个新的元追踪系统的开源版本。这将允许其他人以我们的工作为基础,无论是语言组合,还是简单地使单个语言运行得更快。
英文摘要
As our software systems grow in size and complexity, increasingly diverse usershave different wants and needs from their languages: the right language for astatistician (e.g. R) is different from that of someone who formally verifiessafety properties (e.g. OCaml), which is different again from someone creatinguser-facing apps (e.g. Javascript). However, different languages inhabitdifferent silos and interactions between them are crude and slow. Languagecomposition has long been touted as the solution to this problem, allowinglanguages to be used together in a fine-grained way, but has traditionallystruggled to match this promise. In the Lecture Fellowship, my team and I showedthat large, messy, real-world languages can be composed together, even allowingdifferent languages to be intermingled within a single line of code. We wereable to make the performance of such multi-lingual programs close to theirmono-language constituents, showing that language composition's promise is real.However, in the course of this research, an unexpected problem became apparent:Virtual Machines (VMs), the systems used to make many languages run fast (andwhich are crucial to the good performance of language composition), do notperform as expected. In the largest VM experiment to date, we showedthat VMs perform incorrectly in around 60% of cases. Attempts to fix existingVMs have largely failed, because the problems are so deeply embedded that theycannot be teased out, even after careful examination. This is a significantproblem for language composition, for which VMs are a foundational pillar.This Fellowship Extension thus aims to show that VMs can have good, predictableperformance and that they are a suitable foundational pillar for languagecomposition. However, we cannot expect to create a traditional VM, which oftenconsume tens, hundreds, or thousands of person years of effort. Instead, my teamand I will create a new meta-tracing VM system, since history shows that thesecan be created in a small number of person years. Fortunately for us,meta-tracing has also been shown as the fastest way to run multi-lingualprograms, so it is a natural fit. We will rigorously benchmark the newmeta-tracing system we create from the beginning of, and throughout, itsdevelopment. This will enable us to observe performance regressions soon afterthey occur, allowing us to fix them quickly.We will also take the opportunity to address one of meta-tracing's biggestweaknesses: its slow warmup, that is the time between a program starting, andJIT compilation completing. Tracing currently involves a software interpreterinterpreting a software interpreter, with a 100-200x overhead when a loop istraced. We will use the Processor Trace (PT) feature found in recent x86 chipsto move the software part of meta-tracing into hardware, giving a roughly 100xspeed-up to this critical phase of the system. That will also allow us to bemore aggressive in optimising other parts of the tracer that currently causepoor warm-up.At the end of this Fellowship Extension, alongside traditional research papers,we will produce an open-source release of our new meta-tracing system. This willallow others to build on our work, be that for language composition, or simplyto make individual languages run fast.
期刊论文(0)
专著(0)
科研奖励(0)
会议论文
Chrompartments: Hybrid Compartmentalisation for Web Browsers
-
批准号:EP/X015963/1
-
项目类别:Research Grant
-
资助金额:$137.27万
-
财政年份:2022
-
负责人:Laurence Tratt
-
依托单位:
CapableVMs
-
批准号:EP/V000373/1
-
项目类别:Research Grant
-
资助金额:$106.67万
-
财政年份:2020
-
负责人:Laurence Tratt
-
依托单位:
LECTURE: LanguagE ComposiTion UnifiEd
-
批准号:EP/L02344X/1
-
项目类别:Fellowship
-
资助金额:$121.48万
-
财政年份:2014
-
负责人:Laurence Tratt
-
依托单位:
COOLER: COmpOsing LanguagE Runtimes
-
批准号:EP/K01790X/1
-
项目类别:Research Grant
-
资助金额:$78.86万
-
财政年份:2013
-
负责人:Laurence Tratt
-
依托单位:
海外基金