Automatic Object Inlining in a Java Virtual Machine

Christian Wimmer

Research output: BookMonograph

Abstract

Java applications are compiled to platform-independent bytecodes and executed using a virtual machine. Inside the VM, the just-in-time compiler translates frequently executed methods to opti-mized machine code, and the garbage collector reclaims unreferenced objects automatically. Both impose a run-time overhead, but they can be used to implement novel feedback-directed optimizations inside the VM that are not possible in a static compiler. Following the object-oriented design principle, Java applications allocate many small objects linked together by field references. Object inlining reduces the costs of field accesses by combining refe-renced objects with their referencing object. The order of objects on the heap is changed by the garbage collector so that they 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 using the just-in-time compiler. Array inlining expands the concepts of object inlining to arrays, which are frequently used for the implementation of dynamic data structures. This book presents a novel feedback-directed approach for object and array inlining that is performed automatically at run time, requires no actions on the part of the programmer, and supports dynamic class loading. The book describes the algorithms, illustrates them with several examples, and evaluates them using a set of typical benchmarks.
Original languageEnglish
Place of PublicationKöglstraße 14, 4021 Linz
PublisherTRAUNER Verlag
ISBN (Print)978-3-85499-417-6
Publication statusPublished - May 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