Font Size: a A A

Research On Self-modifying Code Cache Policy In Binary Translation

Posted on:2009-03-24Degree:MasterType:Thesis
Country:ChinaCandidate:A Z LiuFull Text:PDF
GTID:2178360275471813Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
In binary translation, self-modifying code is a difficult issue and factor that influences the translation efficiency. Many papers introduce the influence of Self-modifying code on binary translator, but there are no quantitative research discovered. Self-modifying code has the characteristics that it can dynamically modify and yield the code of the program during running time. And self-modifying code has abroad application in the field of computer secutity. There is a great valueable issue to accelerate the translation efficiency through design and relize great efficiency policy of code cache in binary translator, when self-modifying code occurs frequently.To address the issues above,using QEMU as the experimentation platform, this thesis carries on massive tests about the self-modifying and non-self-modifying code, thoroughly analyses translation time efficiency and the translation block number which is influenced by the self-modifying code. Bases on quantitative research of Self-modifying code's influence on the translation efficiency, and combines the advantages of basic block and trace translation mechanism, to accelerate self-modifying code translation, the thesis provides a code cache policy named PSCM, and realizes fundamental PSCM prototype system. PSCM uses trace as the translation mechanism. Through precise-block replace, replaces the disaccorded block in code cache. Through mapping, relates the modified page and basic translation block. Through locating, finds the trace that a block belongs to. Through code cache management maintains the trace information and translation block in code cache.From the research, the speed about procedure execution time increasing with numbers of self-modifying when self-modifying code is executed on QEMU is 5.81 times of the speed when non-self-modifying code is executed on QEMU; Each time there is one more time of self-modifying, the translation block averagely increases 10.51 blocks; Trace mechanism has more distinct advantage than basic block in translator. The test result of PSCM prototype indicates, when the FB (numbers of translated blocks in Code cache) is 11, the tactics acceleration ratio of PSCM is 3.95; PSCM tactics acceleration ratio increases with the increasement of FB, which means the advantage of PSCM appears more obvious when FB is big. PSCM can be used to improve translation efficiency for self-modifying code.
Keywords/Search Tags:Binary translation, Self-Modifying Code, Code cache Management, Self-Modifying Code Translation policy, Self-Modifying Code cache policy
PDF Full Text Request
Related items