Coupling On-Line and Off-Line Profile Information to Improve Program Performance

Chandra Krintz

International Symposium on Code Generation and Optimization (CGO03), March, 2003


Dynamic compilation and optimization are widely used for Internet computing, in which an intermediate form of the code is compiled to native code during execution. An important tradeoff exists between the amount of time spent dynamically optimizing the program and the overall runtime of the program. Since optimization occurs while the program is executing, it introduces runtime overhead. For Java programs, this overhead can be substantial due to compilation effort required to convert bytecode to highly efficient machine code.

In this paper, we describe a novel execution environment for Java programs that substantially reduces the overhead due to compilation and optimization by coupling two key dynamic compilation technologies: adaptive optimization and annotation-guided optimization. In the former, profiles are collected using on-line instrumentation and sampling of dynamic profile data. In the latter, off-line profiles are generated, encoded compactly, and transported with the program files for use by a dynamic optimization system.

Both methodologies (adaptation and annotation), when used alone, have drawbacks: adaptation introduces overhead for on-line instrumentation, measurement, and decision making, and annotations based on off-line profile information can be inaccurate when program inputs for execution and optimization differ from those used for profiling. To combat these drawbacks and to achieve the benefits from both on-line and off-line profiling, we developed a dynamic compilation system (based on JikesRVM) that makes use of both. As a result, we are able improve Java program performance by 9--15% on average, for the programs studied.