Font Size: a A A

The Adaptive Optimizations In Java Virtual Machine

Posted on:2009-07-09Degree:DoctorType:Dissertation
Country:ChinaCandidate:Q ZouFull Text:PDF
GTID:1118360242495804Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
Java language is widely used in software design for its merits in software engineer.Java applications run on the Java virtual machine.Compared with binary code generated by traditional compilation,it has features of better modularity, platform independence,type safety and so on.These features make Java language more suitable for fast and safe development of many large scale softwares. However,those characters cause traditional compilation unable to work. Researchers keep exploring new compilation techniques to get better performance on Java virtual machine.For the short of runtime information,static compilation adapts complex global analysis,which can't satisfy our requirements.The popularity of Java virtual machine involves compilation and optimization at runtime,industries focuses on adaptive optimizations,and they want to optimize the applications according to runtime feedback.This dissertation systematically and deeply investigates the adaptive optimization and locality problem in Java virtual machine.The contributions of this work are as follows:Firstly,we design and implement an efficient adaptive optimization framework. The framework collects fine grained information by instrumentation,which also will be adjusted according to the runtime feedback.We also utilize the characters of Java applications to reduce the side-effect of instrumentation.Compared with static analysis,our work is implemented at runtime and is independent of variable data set.Compared with dynamic analysis,we designed an adaptive optimization framework in Java virtual machine,and supplied a gap in dynamic compilation techniques.We try to make the overhead lowest throughout the framework:its design,instrumentation,and so on.The results show that the overhead of the framework is 1.7%on average,with highest of 2.5%.The framework provides a platform for locality optimization in subsequent chapters. Secondly,we suggested a fast slide mark compact algorithm.Allocation order is the best for locality,which slide mark compact algorithm is based on.But traditional design made the algorithm's overhead too large.In this dissertation, we proposed a fast slide mark compact algorithm,which reduces the overhead by mark bit table,live block pool and offset table.The results show that it achieves up to 8.9%speedup in industry-standard benchmark SpecJBB2005,SpecJVM98 and Dacapo on the Pentium 4,11%improvement in dtlb miss numbers and 13.6% reduce with L2 cache miss numbers.Thirdly,a dynamic prefetch optimization is adopted based on the adaptive framework.We instruments the program in JIT compiler for load address profiling, detects the stride patterns periodically at runtime.When a stride pattern is discovered,we injects prefetch instruction and removes the instrumentation effect. The key points in the design are the tradeoffs between prefetching accuracy and runtime overhead.In order to reduce the runtime overhead,we developed techniques to remove the redundant instrumentations,control the prefetch instruction injections,and disable the useless instrumentation.Our pattern detection is light-weighted that we use a sliding window to filter the trace information for runtime analysis,and we use a stride frequency array that covers stride range between -64 and 64.Finally,the experimental evaluations show that the prefetch optimization can speedup SpecJBB2005.SpecJVM98 and DaCapo benchmarks up to 18.1%,with an average of 7.15%.At the same time,the maximal runtime overhead is less than 4%,and the memory overhead is negligible.Finally,we combined object affinity with garbage collection.Firstly,we use hardware performance analyzer to locate delequent objects,find out the affinity between them,and build an affinity graph.Garbage collection refers affinity graph,and the related objects would be colocated,such design can improve the location between delequent objects,because related objects are always accessed sequently.The experimental evaluations show the garbage collection based on object affinity can speedup SpecJBB2005.SpecJVM98 and Dacapo benchmarks up to 4.9%,with an average of 3.4%.At the same time,the overhead of hardware method is 0.47%.Finally,we implemented prefetch optimization on it,the result shows that the performance won't be reduced,for some applications,the performance are better.
Keywords/Search Tags:JVM, framework of adaptive optimization, garbage collection, object locality, prefetch, affinity
PDF Full Text Request
Related items