An Instruction Inflation Analyzing Framework for Dynamic Binary Translators

Author:

Xie Benyi1ORCID,Yan Yue1ORCID,Yan Chenghao1ORCID,Tao Sicheng2ORCID,Zhang Zhuangzhuang2ORCID,Li Xinyu1ORCID,Lan Yanzhi1ORCID,Wu Xiang1ORCID,Liu Tianyi3ORCID,Zhang Tingting4ORCID,Zhang Fuxin1ORCID

Affiliation:

1. State Key Lab of Processors, Institute of Computing Technology, CAS, Beijing, China and University of Chinese Academy of Sciences, Beijing, China

2. University of Science and Technology of China, Hefei, China

3. The University of Texas at San Antonio, Texas, USA

4. Loongson Technology Co. Ltd., Beijing, China and Institute of Computing Technology, CAS, Beijing, China

Abstract

Dynamic binary translators (DBTs) are widely used to migrate applications between different instruction set architectures (ISAs). Despite extensive research to improve DBT performance, noticeable overhead remains, preventing near-native performance, especially when translating from complex instruction set computer (CISC) to reduced instruction set computer (RISC). For computational workloads, the main overhead stems from translated code quality. Experimental data show that state-of-the-art DBT products have dynamic code inflation of at least 1.46. This indicates that on average, more than 1.46 host instructions are needed to emulate one guest instruction. Worse, inflation closely correlates with translated code quality. However, the detailed sources of instruction inflation remain unclear. To understand the sources of inflation, we present Deflater , an instruction inflation analysis framework comprising a mathematical model, a collection of black-box unit tests called BenchMIAOes , and a trace-based simulator called InflatSim . The mathematical model calculates overall inflation based on the inflation of individual instructions and translation block optimizations. BenchMIAOes extract model parameters from DBTs without accessing DBT source code. InflatSim implements the model and uses the extracted parameters from BenchMIAOes to simulate a given DBT’s behavior. Deflater is a valuable tool to guide DBT analysis and improvement. Using Deflater, we simulated inflation for three state-of-the-art CISC-to-RISC DBTs: ExaGear, Rosetta2, and LATX, with inflation errors of 5.63%, 5.15%, and 3.44%, respectively for SPEC CPU 2017, gaining insights into these commercial DBTs. Deflater also efficiently models inflation for the open source DBT QEMU and suggests optimizations that can substantially reduce inflation. Implementing the suggested optimizations confirms Deflater’s effective guidance, with 4.65% inflation error, and gains 5.47x performance improvement.

Funder

National Key Research and Development Program of China

Publisher

Association for Computing Machinery (ACM)

Reference68 articles.

1. Apple. 2021. About the Rosetta Translation Environment. Retrieved March 3 2023 from https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment

2. Apple. 2022. Running Intel Binaries in Linux VMs with Rosetta. Retrieved March 30 2023 from https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta

3. ARM. 2013. ARM CoreSight Architecture Specification v2.0. ARM.

4. ARM. 2019. Cortex®-A77 Software Optimization Guide. ARM.

5. ARM. 2020. Arm® Neoverse™ N2 Software Optimization Guide. ARM.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3