摘要
在二进制翻译中,库函数本地化处理是指不直接翻译源文件中的库函数而是使用本地目标机的库函数进行替换,以此提高翻译性能。针对国产平台二进制翻译中库函数处理翻译模式的相关特性,提出一种库函数解析处理机制,借助helper函数实现库函数替换操作。通过修改基本块划分规则,将库函数替换部分翻译的基本块进行合并,构建超级块,减少源程序中基本块划分数量与程序执行跳转次数,在保证翻译正确性基础上有效提高翻译效率。在动态二进制翻译器QEMU上进行的实验结果表明,与未优化的库函数处理翻译方式相比,翻译后程序加速比平均提升9%,有效提高了翻译效率。
In binary translation,library functions localization processings do not directly translate library functions in source files but use library functions of local target machines to improve translation performance.Aiming at the related characteristics of library function processing translation mode in binary translation of domestic platform,a library function analysis processing mechanism is proposed.The library function replacement operation is realized by the helper function.By modifying the basic block partitioning rules,the library function replaces the partially translated basic blocks to merge,constructs the super block,reduces the number of basic block partitions and program execution jumps in the source program,and effectively improves the translation efficiency on the basis of ensuring the translation correctness.Experimental results based on the dynamic binary translator QEMU show that compared with the unoptimized library function processing translation method,the post-translation program acceleration ratio is increased by 9 %,which verifies the effectiveness of the mechanism.
作者
张家豪
单征
岳峰
傅立国
王军
ZHANG Jiahao;SHAN Zheng;YUE Feng;FU Liguo;WANG Jun(State Key Laboratory of Mathematical Engineering and Advanced Computing,Zhengzhou 450001,China)
出处
《计算机工程》
CAS
CSCD
北大核心
2019年第5期72-76,83,共6页
Computer Engineering
基金
国家自然科学基金(61472447)
国家高技术研究发展计划(2009AA012201)
"核高基"重大专项(2009ZX01036-001-001)
关键词
二进制翻译
库函数解析
基本块合并
QEMU翻译器
国产平台
binary translation
library function analysis
basic block merging
QEMU translator
domestic platform