Adaptive inlining and on-stack replacement in the CACAO virtual machine

Edwin Steiner, Andreas Krall, Christian Thalinger · 2007

Method inlining is a well-known and effective optimization technique for object-oriented programs. In the context of dynamic compilation, method inlining can be used as an adaptive optimization in order to eliminate the overhead of frequently executed calls. This work presents an implementation of method inlining in the CACAO virtual machine. On-stack replacement is used for installing optimized code and for deoptimizing code when optimistic assumptions of the optimizer are broken by dynamic class loading. Three inlining heuristics are compared using empirical results from a set of benchmark programs. The best heuristic eliminates 51.5 % up to 99.96 % of all executed calls and improves execution time up to 18%.

Read the paper · More papers on PaperTik