Skip to main content

Automatic Object Colocation Based on Read Barriers

  • Conference paper
  • 645 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4228))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Chapter  Google Scholar 

  2. 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)

    Chapter  Google Scholar 

  3. 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)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. Intel Corporation: IA-32 Intel Architecture Software Developer’s Manual, vol. 1: Basic Architecture, Order Number 253665-018 (2006)

    Google Scholar 

  7. Jones, R., Lins, R.: Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley & Sons, Chichester (1996)

    MATH  Google Scholar 

  8. 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)

    Chapter  Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. Pozo, R., Miller, B.: SciMark 2.0 (1999), http://math.nist.gov/scimark2/

  12. Standard Performance Evaluation Corporation: The SPEC JVM98 Benchmarks (1998), http://www.spec.org/jvm98/

  13. Standard Performance Evaluation Corporation: The SPEC JBB 2005, Benchmark (2005), http://www.spec.org/jbb2005/

  14. Sun Microsystems, Inc.: Java SE 6: Mustang Snapshot Releases (2006), https://mustang.dev.java.net/

  15. 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)

    Chapter  Google Scholar 

  16. 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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics