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 HotSpotTM 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.
This work was supported by Sun Microsystems, Inc.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Arnold, M., Ryder, B.G.: A framework for reducing the cost of instrumented code. In: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation, pp. 168–179. ACM Press, New York (2001)
Blackburn, S.M., Hosking, A.L.: Barriers: friend or foe? In: Proceedings of the 4th international symposium on Memory management, pp. 143–151. ACM Press, New York (2004)
Chilimbi, T.M., Larus, J.R.: Using generational garbage collection to implement cache-conscious data placement. In: Proceedings of the 1st international symposium on Memory management, pp. 37–48. ACM Press, New York (1998)
Griesemer, R., Mitrovic, S.: A compiler for the Java HotSpotTM virtual machine. In: Böszörményi, L., Gutknecht, J., Pomberger, G. (eds.) The School of Niklaus Wirth: The Art of Simplicity, pp. 133–152. dpunkt.verlag (2000)
Huang, X., Blackburn, S.M., McKinley, K.S., Moss, J.E.B., Wang, Z., Cheng, P.: The garbage collection advantage: improving program locality. In: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 69–80. ACM Press, New York (2004)
Intel Corporation: IA-32 Intel Architecture Software Developer’s Manual, vol. 1: Basic Architecture, Order Number 253665-018 (2006)
Jones, R., Lins, R.: Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley & Sons, Chichester (1996)
Kotzmann, T., Mössenböck, H.: Escape analysis in the context of dynamic compilation and deoptimization. In: Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments, pp. 111–120. ACM Press, New York (2005)
Kotzmann, T., Mössenböck, H.: Reallocation and garbage collection support for scalar-replaced and stack-allocated objects. Technical report, Institute for System Software, Johannes Kepler University Linz (2006)
Lhoták, O., Hendren, L.: Run-time evaluation of opportunities for object inlining in Java. In: Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande, pp. 175–184. ACM Press, New York (2002)
Pozo, R., Miller, B.: SciMark 2.0 (1999), http://math.nist.gov/scimark2/
Standard Performance Evaluation Corporation: The SPEC JVM98 Benchmarks (1998), http://www.spec.org/jvm98/
Standard Performance Evaluation Corporation: The SPEC JBB 2005, Benchmark (2005), http://www.spec.org/jbb2005/
Sun Microsystems, Inc.: Java SE 6: Mustang Snapshot Releases (2006), https://mustang.dev.java.net/
Veldema, R., Ceriel, J.H., Rutger, F.H., Henri, E.: Object combining: A new aggressive optimization for object intensive programs. In: Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande, pp. 165–174. ACM Press, New York (2002)
Wimmer, C., Mössenböck, H.: Optimized interval splitting in a linear scan register allocator. In: Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments, pp. 132–141. ACM Press, New York (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Wimmer, C., Mössenböck, H. (2006). Automatic Object Colocation Based on Read Barriers. In: Lightfoot, D.E., Szyperski, C. (eds) Modular Programming Languages. JMLC 2006. Lecture Notes in Computer Science, vol 4228. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11860990_20
Download citation
DOI: https://doi.org/10.1007/11860990_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40927-4
Online ISBN: 978-3-540-40928-1
eBook Packages: Computer ScienceComputer Science (R0)