skip to main content
10.1145/1028976.1028996acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Finding your cronies: static analysis for dynamic object colocation

Published:01 October 2004Publication History

ABSTRACT

This paper introduces <i>dynamic</i> object colocation, an optimization to reduce copying costs in generational and other incremental garbage collectors by allocating connected objects together in the same space. Previous work indicates that connected objects belong together because they often have similar lifetimes. Generational collectors, however, allocate all new objects in a <i>nursery</i> space. If these objects are connected to data structures residing in the <i>mature</i> space, the collector must copy them. Our solution is a cooperative optimization that exploits compiler analysis to make runtime allocation decisions. The compiler analysis discovers potential object connectivity for newly allocated objects. It then replaces these allocations with calls to <i>coalloc</i>, which takes an extra parameter called the <i>colocator</i> object. At runtime, coalloc determines the location of the colocator and allocates the new object together with it in either the nursery or mature space. Unlike pretenuring, colocation makes precise per-object allocation decisions and does not require lifetime analysis or allocation site homogeneity. Experimental results for SPEC Java benchmarks using Jikes RVM show colocation can reduce garbage collection time by 50% to 75%, and total performance by up to 1%.

References

  1. O. Agesen and A. Garthwaite. Efficient object sampling via weak references. In ACM International Symposium on Memory Management, pages 121--127, Minneapolis, MN, Oct. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. B. Alpern et al. Implementing Jalapeno in Java. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 314--324, Denver, CO, Nov. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. B. Alpern et al. The Jalapeno virtual machine. IBM Systems Journal, 39(1):211--238, February 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994.Google ScholarGoogle Scholar
  5. A. W. Appel. Simple generational garbage collection and fast allocation. Software Practice and Experience, 19(2):171--183, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. M. Blackburn, P. Cheng, and K. S. McKinley. Myths and realities: The performance impact of garbage collection. In ACM Conference on Measurement & Modeling Computer Systems, pages 25--36, New York, NY, June 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. M. Blackburn, P. Cheng, and K. S. McKinley. Oil and water? High performance garbage collection in Java with JMTk. In Proceedings of the International Conference on Software Engineering, pages 137--146, Scotland, UK, May 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. M. Blackburn, R. E. Jones, K. S. McKinley, and J. E. B. Moss. Beltway: Getting around garbage collection gridlock. In ACM Conference on Programming Languages Design and Implementation, pages 153--164, Berlin, Germany, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. M. Blackburn, S. Singhai, M. Hertz,, K. S. McKinley, and J. E. B. Moss. Pretenuring for Java. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 342--352, Tampa, FL, Oct. 2001. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. B. Blanchet. Escape analysis for Java: Theory and practice. ACM Transactions on Programming Languages and Systems, 25(6):713--775, Nov. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. R. Chase, M. Wegman, and F. K. Zadeck. Analysis of pointers and structures. In ACM Conference on Programming Languages Design and Implementation, pages 296--310, White Plains, NY, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Cheng, R. Harper, and P. Lee. Generational stack collection and profile-driven pretenuring. In ACM Conference on Programming Languages Design and Implementation, pages 162--173, Montreal, Canada, May 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. M. Chilimbi, M. D. Hill, and J. R. Larus. Cache-conscious structure layout. In ACM Conference on Programming Languages Design and Implementation, pages 1--12, Atlanta, GA, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. M. Chilimbi and J. R. Larus. Using generational garbage collection to implement cache-conscious data placement. In ACM International Symposium on Memory Management, pages 37--48, Vancouver, BC, Oct. 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Choi, M. Gupta, M. J. Serrano, V. C. Sreedhar, and S. P. Midkiff. Stack allocation and synchronization optimizations for Java using escape analysis. ACM Transactions on Programming Languages and Systems, 25(6):876--910, Nov. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T. Domani, G. Goldshtein, E. Kolodner, E. Lewis, E. Petrank, and D. Sheinwald. Thread-local heaps for Java. In ACM International Symposium on Memory Management, pages 76--87, Berlin, Germany, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural Points-to analysis in the presence of function pointers. In ACM Conference on Programming Languages Design and Implementation, pages 242--256, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Ghiya and L. J. Hendren. Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C. In ACM Symposium on the Principles of Programming Languages, St. Petersburg Beach, FL, Jan. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. L. Harris. Dynamic adaptive pre-tenuring. In ACM International Symposium on Memory Management, pages 127--136, Minneapolis, MN, Oct. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Hirzel, A. Diwan, and M. Hertz. Connectivity-based garbage collection. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 359--373, Anaheim, CA, Oct. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Hirzel, J. Hinkel, A. Diwan, and M. Hind. Understanding the connectivity of heap objects. In ACM International Symposium on Memory Management, pages 36--49, Berlin, Germany, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. X. Huang, Z. Wang, S. M. Blackburn, K. S. McKinley, J. E. B. Moss, and P. Cheng. The garbage collection advantage: Improving mutator locality. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Vancouver, BC, 2004. To appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. L. Hudson and J. E. B. Moss. Incremental garbage collection for mature objects. In Y. Bekkers and J. Cohen, editors, International Workshop on Memory Management, St. Malo, France, volume 637 of Lecture Notes in Computer Science. Springer-Verlag, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. S. Lam, P. R. Wilson, and T. G. Moher. Object type directed garbage collection to improve locality. In Y. Bekkers and J. Cohen, editors, ACM International Workshop on Memory Management, number 637 in Lecture Notes in Computer Science, pages 404--425, St. Malo, France, Sept. 1992. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. Lea. A memory allocator. http://gee.cs.oswego.edu/dl/html/malloc.html, 1997.Google ScholarGoogle Scholar
  27. H. Lieberman and C. E. Hewitt. A real time garbage collector based on the lifetimes of objects. Communications of the ACM, 26(6):419--429, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. F. Qian and L. Hendren. An adaptive, region-based allocator for Java. In ACM International Symposium on Memory Management, Berlin, Germany, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. N. Sachindran and J. E. B. Moss. Mark-Copy: Fast copying GC with less space overhead. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 326--343, Anahiem, CA, Oct. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Y. Shuf, M. Gupta, R. Bordawekar, and J. P. Singh. Exploiting prolific types for memory management and optimzations. In ACM Symposium on the Principles of Programming Languages, pages 295--306, Portland, OR, Jan. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 edition, March 1999.Google ScholarGoogle Scholar
  32. Standard Performance Evaluation Corporation. SPECjbb2000 (Java Business Benchmark) Documentation, release 1.01 edition, 2001.Google ScholarGoogle Scholar
  33. D. Stefanovic, K. McKinley, and J. Moss. Age-based garbage collection. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 370--381, Denver, CO, Nov. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. D. Ungar and F. Jackson. Tenuring policies for generation-based storage reclamation. In ACM Conference on Object Oriented Programming Systems, Languages, and Applications, pages 1--17, San Diego, California, Nov. 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. D. Ungar and F. Jackson. An adaptive tenuring policy for generation scavengers. ACM Transactions on Programming Languages and Systems, 14(1):1--27, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. D. M. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. In ACM Software Engineering Symposium on Practical Software Development Environments, pages 157--167, April 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. P. R. Wilson, M. S. Lam, and T. G. Moher. Effective static-graph reorganization to improve locality in garbage-collected systems. In ACM SIGPLAN Conference on Programming Languages Design and Implementation, pages 177--191, Toronto, Canada, June 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Finding your cronies: static analysis for dynamic object colocation

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Conferences
    OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
    October 2004
    462 pages
    ISBN:1581138318
    DOI:10.1145/1028976
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 39, Issue 10
      OOPSLA '04
      October 2004
      448 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1035292
      Issue’s Table of Contents

    Copyright © 2004 ACM

    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 1 October 2004

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • Article

    Acceptance Rates

    Overall Acceptance Rate268of1,244submissions,22%

    Upcoming Conference

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader