Title :
VBIW: Optimizing Indirect Branch in Dynamic Binary Translation
Author :
Xiaochun Zhang ; Xiang Gao ; Qi Guo ; Jing Huang ; Hongwei Liu ; Xiaofu Meng
Author_Institution :
State Key Lab. of Comput. Archit., Inst. of Comput. Technol., Beijing, China
Abstract :
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.
Keywords :
multi-threading; program interpreters; source code (software); storage allocation; DBT execution time reduction; DBT systems; Godson-3; IB translation; MIPS DBT system; SBB; VBIW; address mapping process; consistency maintenance; context switching; dynamic binary translation; dynamic writing; hash lookup; indirect branch optimization; indirect branch translation; multithreaded benchmarks; nontrivial performance overheads; single-threaded benchmarks; source binary blocks; target TBB address; translated binary blocks; virtual branch instruction write-back; Benchmark testing; Context; Emulation; Maintenance engineering; Radiation detectors; Switches; Writing; consistency maintenance; dynamic binary translation; indirect branch; multithreaded emulation; virtual branch instruction;
Conference_Titel :
High Performance Computing and Communications & 2013 IEEE International Conference on Embedded and Ubiquitous Computing (HPCC_EUC), 2013 IEEE 10th International Conference on
Conference_Location :
Zhangjiajie
DOI :
10.1109/HPCC.and.EUC.2013.206