谷歌大规模迁移代码到Arm架构,发现重编译比二进制翻译更关键。
Instruction Set Migration at Warehouse Scale
- 通过重编译替代传统二进制翻译,实现x86到Arm的大规模迁移。
- 分析近4万次代码提交,提炼出迁移中的核心任务分类。
- 揭示自动化与AI在迁移中的潜力,指出仍需研究的难点。
将代码库从一种指令集架构(ISA)迁移到另一种是重大工程挑战。近期,主要云服务商在采用Arm(除x86外)即为一例。然而,该问题在学术界关注有限。以往研究多聚焦于静态和动态二进制翻译,普遍认为这是主要难题。本文表明,这一认知已过时。现代ISA迁移可依托成熟的开源生态,实现所有相关软件的重新编译。这带来了一系列全新且多维度的挑战,与二进制翻译迥异。通过对谷歌一次涵盖近40,000个代码提交的大规模x86到Arm迁移进行分析,我们构建了迁移任务的分类体系。结果显示,谷歌已自动化许多步骤,并展示人工智能在解决这些任务中的重要作用。同时识别出仍具挑战性的任务,指明值得深入研究的关键问题。
原文摘要 · Abstract (English)
Migrating codebases from one instruction set architecture (ISA) to another is a major engineering challenge. A recent example is the adoption of Arm (in addition to x86) across the major Cloud hyperscalers. Yet, this problem has seen limited attention by the academic community. Most work has focused on static and dynamic binary translation, and the traditional conventional wisdom has been that this is the primary challenge. In this paper, we show that this is no longer the case. Modern ISA migrations can often build on a robust open-source ecosystem, making it possible to recompile all relevant software from scratch. This introduces a new and multifaceted set of challenges, which are different from binary translation. By analyzing a large-scale migration from x86 to Arm at Google, spanning almost 40,000 code commits, we derive a taxonomy of tasks involved in ISA migration. We show how Google automated many of the steps involved, and demonstrate how AI can play a major role in automatically addressing these tasks. We identify tasks that remain challenging and highlight research challenges that warrant further attention.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。