Home

Partial method compilation using dynamic profile information


Author(s) : John Whaley, 
Publisher : N/A
Publication Date : 2001
ISSN : N/A
Abstract : The traditional tradeo when performing dynamic compilation is that of fast compilation time versus fast code performance. Most dynamic compilation systems for Java perform selective compilation and/or optimization at a method granularity. This is the not the optimal granularity level. However, compiling at a sub-method granularity is thought to be too complicated to be practical. This paper describes a straightforward technique for performing compilation and optimizations at a ner, submethod granularity. We utilize dynamic prole data to determine intra-method code regions that are rarely or never executed, and compile and optimize the code without those regions. If a branch that was predicted to be rare is actually taken at run time, we fall back to the interpreter or dynamically compile another version of the code. By avoiding compiling and optimizing code that is rarely executed, we are able to decrease compile time signicantly, with little to no degradation in performance. Furthermore, ignoring rarely-executed code can open up more optimization opportunities on the common paths. We present two optimizations | partial dead code elimination and rare-path-sensitive pointer and escape analysis | that take advantage of rare path information. Using these optimizations, our technique is able to improve performance beyond the compile time improvements.,