Efficient Online Trace Building Using Code Replication
Haipeng Deng, Kai Chen, Bo Liu, Yunchao He, Kan Zhou, Yindong Yang, Alei Liang, Haibing Guan · 2010
Hot trace building plays an important role in enhancing the performance of dynamic binary translators, since in most cases 10% of code takes 90% of execution time of the whole program. Hot traces can promote the code position to make better the locality of the code, therefore programs can achieve a better performance. Thus how to build qualified and long hot traces is the key point. Considering the situation when one single basic block is needed by more than two hot traces, code replication can help build hot traces with cost of expansion of code size. In this paper, a code replication method to help with building hot traces as well as code positioning is presented, and experiments have been done to evaluate the details of changes that code replication brings to the system, like trace fragment length, memory size expansion, etc. With this method, a performance promotion by 0.5%-3.5% against the original trace building method has been achieved.