Font Size: a A A

Reorganization And Optimization Of The Back-end Code In Dynamic Binary Translation

Posted on:2012-07-28Degree:MasterType:Thesis
Country:ChinaCandidate:H P DengFull Text:PDF
GTID:2178330338484236Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Binary translation is a method to execute the binary code of one machine platform on another machine platform without recompiling the source code. Dynamic binary translation(DBT) means binary translation is done on the fly at run-time in which a lot of instrumentation and optimization work could be applied. Dynamic binary translation could be a good tool to solve the problem of legacy code, code migration and building a virtual computing environment, and accordingly, it becomes more and more attractive in recent years.This paper focuses on the idea of how the program changes, like the performance and the superblocks, after applying some methods to reorganize the code layout at the backend of the dynamic binary translator. Profiling information could be gathered by using the DBT framework and could be used to optimize the programs. DBT could also be a good tool to detect the changes that the reorganization of the code layout and other optimization methods bring to the program behaviors. The points this paper concerns are: detecting hot trace by using profiling information, reorganizing the code layout by using the static-integrated framework of DBT, building superblocks by code replication in DBT, and distinguish changes the methods above bring to the program.Profiling is a method to collect the information of the run-time programs. General ways of profiling in DBT system could be divided into 3 classifications: block based, edge based, and trace based. Block based profiling brings the least overhead, since its algorithm is simple and profiling information is not so plentiful, and path based profiling brings the most overhead, because of its complex algorithm and numerous profiling information.Code block sequences with high execution frequency indicate a hot trace. Many algorithms could help predict a hot trace. Considering the overhead, DBT systems usually employ algorithms that uses the block based profiling methods.Superblock is a part of hot trace and consists of many basic blocks that have a high execution frequency. It has one entry and many exits and building superblock is the way to complete building hot trace actually. In DBT, On one hand superblock could save the overhead of context switch; on the other hand it could help optimize the code since it puts more code together. So, making the superblock longer and less is one goal of making better the superblocks. Code replication is a way to copy the shared block to enhance the quality of the superblock.In static-integrated Crossbit (SI-Crossbit), profiling information is gathered at the first run of program, and then optimization is done in the static way, finally code is reloaded into the memory and executed. In this paper, static-integrated Crossbit uses edge based profiling information to detect hot trace and reorder the code layout by execution frequency.In this paper, optimizing the code layout by both reordering the code and coping shared blocks to enhance the performance of the Crossbit platform has been applied. And testing using SPEC CPU2000 has been done to analyze the quality of superblock and other indexes that have been changed. The data indicate that good superblock quality and code layout have promoted the performance of the Crossbit system...
Keywords/Search Tags:Dynamic Binary Translation, Dynamic Optimization, Hot Path, Superblock, SI-Crossbit
PDF Full Text Request
Related items