Automatic Object Inlining in a Java Virtual Machine

  • Christian Wimmer

Research output: ThesisDoctoral thesis

Abstract

Object-oriented Java applications allocate many small objects linked together by field references. Such fields are frequently loaded and thus impose a run-time overhead. Object inlining reduces these costs by eliminating unnecessary field loads. It embeds referenced objects into their referencing object. The order of objects on the heap is changed in such a way that objects accessed together are placed next to each other. Then their offset is fixed, i.e. the objects are colocated. This allows field loads to be replaced by address arithmetic. Array inlining expands the concepts of object inlining to arrays, which 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. An efficient code pattern detects these changes and allows the optimized access of such array fields. These optimizations are integrated into Sun Microsystems' Java HotSpot™ virtual machine. The analysis is performed automatically at run time, requires no actions on the part of the programmer, and supports dynamic class loading. It is embedded into the just-in-time compiler and garbage collector and does not need a global data flow analysis. The evaluation shows that the dynamic approach successfully identifies and optimizes frequently accessed fields for several benchmark suites with a reasonable low compilation and analysis overhead.
Original languageEnglish
Publication statusPublished - Feb 2008

Fields of science

  • 102 Computer Sciences
  • 102009 Computer simulation
  • 102011 Formal languages
  • 102013 Human-computer interaction
  • 102029 Practical computer science
  • 102022 Software development
  • 102024 Usability research

Cite this