Automatic Object Colocation Based on Read Barriers

Hanspeter Mössenböck, Christian Wimmer

Research output: Chapter in Book/Report/Conference proceedingConference proceedingspeer-review

Abstract

Object colocation is an optimization that reduces memory access costs by grouping together heap objects so that their order in memory matches their access order in the program. We implemented this optimization for Sun Microsystems’ Java HotSpot™ VM. The garbage collector, which moves objects during collection, assigns consecutive addresses to connected objects and handles them as atomic units. We use read barriers inserted by the just-in-time compiler to detect the most frequently accessed fields per class. These “hot fields” are added to so-called hot-field tables, which are then used by the garbage collector for colocation decisions. Read barriers that are no longer needed are removed in order to reduce the overhead. Our analysis is performed automatically at run time and requires no actions on the side of the programmer. We measured the impact of object colocation on the young and the old generation of the garbage collector, as well as the difference between dynamic colocation using read barriers and a static colocation strategy where colocation decisions are done at compile time. Our measurements show that object colocation works best for the young generation using a read-barrier-based approach.
Original languageEnglish
Title of host publicationProceedings of the Joint Modular Languages Conference (JMLC'06)
PublisherSpringer-Verlag
Pages326-345
Volume4228
ISBN (Print)978-3-540-40927-4
Publication statusPublished - Sept 2006

Publication series

NameLecture Notes in Computer Science (LNCS)

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