Automatic array inlining in java virtual machines
Open Access
- 6 April 2008
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 14-23
Abstract
Array inlining expands the concepts of object inlining to arrays. Groups of objects and arrays that reference each other are placed consecutively in memory so that their relative offsets are fixed, i.e. they are colocated. This allows memory loads to be replaced by address arithmetic, which reduces the costs of field and array accesses. We implemented this optimization for Sun Microsystems' Java HotSpot VM. The optimization is performed automatically and requires no actions on the part of the programmer. Arrays are frequently used for the implementation of dynamic data structures. Therefore, the length of arrays often varies, and fields referencing such arrays have to be changed whenever the array is reallocated. We present an efficient code pattern that detects these changes and allows the optimized access of such array fields. It is integrated into the array bounds check. We also claim that inlining array element objects into an array is not possible without a global data flow analysis. The evaluation shows that our dynamic approach can optimize frequently accessed fields with a reasonable low compilation and analysis overhead. The peak performance of SPECjvm98 is improved by 10% on average, with a maximum of 25%.Keywords
This publication has 15 references indexed in Scilit:
- Design of the Java HotSpot™ client compiler for Java 6ACM Transactions on Architecture and Code Optimization, 2008
- Automatic feedback-directed object inlining in the java hotspot™ virtual machine2007
- The DaCapo benchmarks2006
- Instance-wise points-to analysis for loop-based dependence testing2002
- An automatic object inlining optimization and its evaluation2000
- Field analysis2000
- ABCD2000
- Using generational garbage collection to implement cache-conscious data placement1998
- Automatic inline allocation of objects1997
- Debugging optimized code with dynamic deoptimization1992