Hanspeter Mössenböck, Christian Wimmer,
"Automatic Object Colocation Based on Read Barriers"
: Proceedings of the Joint Modular Languages Conference (JMLC'06), Serie Lecture Notes in Computer Science, Vol. 4228, Springer-Verlag, Seite(n) 326-345, 9-2006, ISBN: 978-3-540-40927-4
Automatic Object Colocation Based on Read Barriers
Sprache des Titels:
Proceedings of the Joint Modular Languages Conference (JMLC'06)
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.