Font Size: a A A

Research Of Trace-based Just-in-time Compilation Technique Of CMinus

Posted on:2017-03-05Degree:MasterType:Thesis
Country:ChinaCandidate:S Z TaoFull Text:PDF
GTID:2348330503492893Subject:Engineering Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Some queries or programs can dynamically be generated by web page scripts or be given from distributed enqueries in web environment. These queries or programs are usually difficult to make static compilation in advance, such as XQuery, Java Script, Python or MATLAB, and they often run in interpreted mode. In order to enhance the efficiency of the interpretive execution, we can use Just-in-Time(a.k. a JIT) compilation technique, which dynamically identifies the frequently executed code and then compilies it into target code for executing. thus to improve the execution efficiency of the whole program.Just-in-time compilation technique can be categorized into method-based JIT compilation and trace-based JIT compilation according to the granularity of compilation. The complied unit of method-based JIT compilation is a method, in which some unfrequently executed codes are also be compiled. By contrast, Trace-based JIT compilation only consider the frequently executed paths as the compiled units. Thus it can make more fine-grained optimization and reducing the overhead for compiling the infrequent codes at the same time, and it can be used to improve the overall execution effienency in quite a number of scenarios.However, it is difficult to develop a Trace-based JIT Compiler, for involving many optimizations of the underlying codes. If we construct a trace-based JIT compilation execution engine for every programing language, it bound to increase the cost of engine's development. For these reason, the application range of Trace-based JIT compilation is limited. A possible solution to this problem is to construct a generic execution engine, which appling the Trace-based JIT compilation technique, thus this technique can be quickly expanded to all other language programs' optimization. Therefore, we develop a generic execution engine for CMinus, which introduced Trace-based JIT compilation technique. any program wrote by another programming language which can be translated to CMinus program, can use this technique to optimize the given program and improve the execution efficiency.In this paper, our contributions are as follows. 1) We present a method to detect the hot traces of CMinus program at runtime and compile these hot traces into target codes for doing compiling executing. 2) We develop a technique to detect the hot Trace at run time and dynamically merge the hot traces with duplicated nodes for re-ducing the overhead of frequently environment switching. 3) We develop a method to ensure the consistency of the results when switch the runtime environments between interpreting mode and compiling executing mode. 4) We design and develop a general trace-based JIT compilation executing system, it can be used for improving the efficiency of language which can be translated to CMinus, thus extends the application range of JIT compilation. The experimental results show that our methods can effectively improve the efficiency of programs with good availability.
Keywords/Search Tags:JIT Compilation, Trace-based, CMinus, Environment switching, Runtime Environment, Java Virtual Machine
PDF Full Text Request
Related items