Hanspeter Mössenböck, Christian Wimmer,
"Automatic Feedback-Directed Object Inlining in the Java HotSpot™ Virtual Machine"
, ACM Press, 6-2007, 3rd International Conference on Virtual Execution Environments (VEE'07), San Diego, CA, June 2007
Automatic Feedback-Directed Object Inlining in the Java HotSpot™ Virtual Machine
Sprache des Titels:
Object inlining is an optimization that embeds certain referenced objects into their referencing object. It reduces the costs of field accesses by eliminating unnecessary field loads. The order of objects in the heap is changed in such a way that objects that are accessed together are placed next to each other in memory so that their offset is fixed, i.e. the objects are colocated. This allows field loads to be replaced by address arithmetic. We implemented this optimization for Sun Microsystems' Java HotSpot™ VM. The analysis is performed automatically at run time, requires no actions on the part of the programmer and supports dynamic class loading.
We use read barriers to detect the most frequently accessed fields that are worth being optimized. To safely eliminate a field load, the colocation of the object that holds the field and the object that is referenced by the field must be guaranteed. Two preconditions must be satisfied for a field before it is optimized: the objects must be allocated together, and the field must not be overwritten later. These preconditions are checked by the just-in-time compiler to avoid a global data flow analysis. The garbage collector ensures that groups of colocated objects are not split: it copies groups as a whole to their new locations.
The evaluation shows that our dynamic approach successfully identifies and optimizes frequently accessed fields for several benchmarks. The improved peak performance of 9% in average for SPECjvm98 (with a maximum speedup of 51%) justifies the startup overhead of 3% in average (with a maximum slowdown of 11%) that is caused mainly by the read barriers and the additional compilation of methods.
Sprache der Kurzfassung:
Notiz zum Zitat:
3rd International Conference on Virtual Execution Environments (VEE'07), San Diego, CA, June 2007