【24h】

VBIW: Optimizing Indirect Branch in Dynamic Binary Translation

机译:VBIW:优化动态二进制翻译中的间接分支

获取原文
获取原文并翻译 | 示例

摘要

A major challenge of Dynamic Binary Translation (DBT) is to efficiently handle the indirect branch. Conventionally, to translate indirect branches (IBs), DBT systems need to conduct address mapping between Source Binary Blocks (SBB) and Translated Binary Blocks (TBB). However, even a dedicated address mapping process still results in non-trivial performance overheads to DBT. This paper first provides exhaustive analysis of the overheads of address mapping, and finds that hash lookup, context switching and consistency maintenance are three main sources of overheads. To address these overheads, we further propose a novel approach called Virtual Branch Instruction Write-back (VBIW). The key idea is to dynamically write a Virtual Branch Instruction (VBI) into the SBB once the mapping is determined. Since the VBI contains the target TBB address of a branch, the costly address mapping can be eliminated for further reference of the same branch. In addition to theoretical analysis of VBIW, we also implement VBIW on a X86 to MIPS DBT system of Godson-3. The experimental results show that VBIW can reduce DBT execution time by 29.5% on average (ranging from 1.8% to 58.5%) for single threaded benchmarks, and by 19.6% on average (4.5% to 62.5%) for multithreaded benchmarks.
机译:动态二进制翻译(DBT)的主要挑战是有效处理间接分支。按照惯例,要转换间接分支(IB),DBT系统需要在源二进制块(SBB)和转换二进制块(TBB)之间进行地址映射。但是,即使是专用的地址映射过程也仍然导致DBT的性能开销不小。本文首先对地址映射的开销进行了详尽的分析,发现哈希查找,上下文切换和一致性维护是开销的三个主要来源。为了解决这些开销,我们进一步提出了一种称为虚拟分支指令回写(VBIW)的新颖方法。关键思想是一旦确定了映射,就将虚拟分支指令(VBI)动态写入SBB。由于VBI包含分支的目标TBB地址,因此可以省去昂贵的地址映射以进一步引用同一分支。除了对VBIW进行理论分析外,我们还在龙芯3号X86到MIPS DBT系统上实现VBIW。实验结果表明,对于单线程基准,VBIW可以平均将DBT执行时间减少29.5%(从1.8%降低到58.5%),对于多线程基准,可以将DBT执行时间平均减少19.6%(4.5%至62.5%)。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号