Research on Dynamic Binary Translation and Optimization Based on QEMU
- Author
- LuoYan
- Advisor
- LiYing
- School
- Zhejiang University
- Major
- Applied Computer Technology
- Classification
- TP314 Compiler,interpreter
- Degree
- Master's thesis
- Year
- 2013
- Downloads
- 4
- Citations
- 0
Abstract
Binary translation is an important technique to resolve the problem of processor compatibility, code migration and legacy code, and it has been a hot point in modern computer development field. Meanwhile, dynamic binary translation is the mainstream of binary translation as it combines the virtues of interpretive execution and static binary translation. This paper is the continuation of QEMU porting project, which is a sub-topic of National Important Science&Technology Specific Projects of China. In this paper, we mainly study the mechanism of dynamic binary translation in QEMU, attempted to promote its translation performance.The main contributions of this dissertation are:1. We deeply analyzed the realization mechanism and key techniques of QEMU dynamic binary translation, like TCG and basic block chaining. We also analyzed the optimization in QEMU binary translation, in order to dig the opportunities of possible optimization.2. We studied and tested current code cache management policy in QEMU, and the experiment shows that when the size of code cache is under64KB, the simulation performance sharply decreased for over half testcases in Mibench testsuite. According to this case, static division based code cache management is proposed in this paper. The basic point of this optimization is that code cache is divided into two sizeable parts by reading the configuration at startup, and then the generated code is stored to one specific part according to its exection times. The experiment proved that when cache size is under64KB, the optimization scheme can play a very good result to most testcases.3. We found that in current QEMU self-modifying code management policy, when code self-modifying happens, the simulation performance sufferes a severe decline. In order to decrease the impact of self-modifying code, this paper proposed a precise self-modifying code management policy, which is base on backtracking. In our policy, the basic block which has code modified is tracked by backtracking, and then minimum changes will be done to original process. The experiment shows that the proposed policy can decrease the processing overhead of each code modification to1/3in average, when comparing to QEMU’s mechanism.
Table of contents
Summary 3-4
Abstract 4-10
Chapter 1 Introduction 10-20
1.1 Background 10-11
1.2 binary Translation system Overview Status 1.3 dynamic binary translation technology and research studies 11-13
hot 13-17
1.3.1 dynamic Binary Translation Research Status 13-15
1.3.2 dynamic binary translation technology research focus 15-17
1.4 thesis background and the main work 17-18
1.5 of this chapter Summary 18-20
Chapter 2 Introduction QEMU dynamic binary translation and optimization analysis 20-32
2.1 Introduction 20-22
2.2 QEMU dynamic binary Translation Introduction 22-30
2.2.1 basic Concepts 22-26
2.2.2 overall process 26-27
2.2.3 static chain technology 27-30
2.3 QEMU dynamic binary translation optimization analysis 30-31
2.4 Summary 31-32
Chapter 3 based on static Cache management strategy division code 32-42
3.1 Introduction 32-33
3.2 QEMU code Cache management strategies 33-34
3.3 Cache size analysis code translation efficiency 34-36
3.4 based on static code division Cache management strategies 36-41
3.4.1 design 36 -37
3.4.2 implementation process 37-41
3.5 Summary 41-42
Chapter 4 nbsp code management system based on accurate self-modifying backtracking ; 42-55
4.1 Introduction 42
4.2 QEMU mechanism of self-modifying code 42-46
4.2.1 self-modifying code detection 42-44
4.2.2 self-modifying code processing 44-46
4.3 self-modifying code analysis of the impact on the translation efficiency 46-49
4.4 based on retrospective precise mechanism of self-modifying code management law 49-54
4.4.1 old code cleared 49-53
4.4.2 new code updates 53-54
4.5 Chapter Summary 54-55
Chapter 5 experimental results and analysis 55-63
5.1 experimental environment 56
5.2 based on static code Cache management Strategy experimental results and analysis division 56-60
5.3 based on accurate self-modifying code management mechanism backtracking experimental results and analysis 60-62
5.4 chapter Summary 62-63
Chapter 6 summary and Outlook 63-65
6.1 paper summarizes 63-64
6.2 Prospects 64 - 65
References 65-68
master's degree during the main research 68-69
Thanks 69
Related dissertations
- Research and Implement of Code Cache Management Policy in QEMU Emulator
- Dynamic Binary Translation Modeling and Parallelization Research
- Research on Improving Mechanism of Precise Exception of QEMU
- Research of Vulnerability Attack Detection on Binary Code
- Research on Dynamic Binary Translation Optimization
- Android SDK Research and Design Based on CK-CPU
- Research on Optimization of Dynamic Binary Translation
- Research and Implementation of QEMU-based Hotspot Code Detection and Dynamic Optimization Model
- The Design and Implementation of a Method of Remote PCI Device Driver
- Research on A Master-Slave Multithreaded Framework and Optimizations of Dynamic Binary Translation
- Research on Completeness of Static Binary Translation and Analysis of Code
- Research on CPU Simulation Via Dynamic Binary Translation
- Research of CPU Virtualization and Optimization of Scheduling Policy under KVM
- Research and design of virtual simulation platform of flight control system
- Dynamic translation and optimization of a number of key technologies
- Self-modifying code reverse analysis method
- Research on Dynamic Binary Translation Based Co-designed Virtual Machine
- Research on the Design and Implementation Techniques of Customizing Application Specific Instruction Set Processors
- Study of Profile-based Optimization Algorithms in Dynamic Binary Translation
- Design and Implement of the TCache of CrossBit Binary Translator