skip to main content
article
Free Access

Profile-based pretenuring

Published:01 January 2007Publication History
Skip Abstract Section

Abstract

Pretenuring can reduce copying costs in garbage collectors by allocating long-lived objects into regions that the garbage collector will rarely, if ever, collect. We extend previous work on pretenuring as follows: (1) We produce pretenuring advice that is neutral with respect to the garbage collector algorithm and configuration. We thus can and do combine advice from different applications. We find for our benchmarks that predictions using object lifetimes at each allocation site in Java programs are accurate, which simplifies the pretenuring implementation. (2) We gather and apply advice to both applications and Jikes RVM, a compiler and runtime system for Java written in Java. Our results demonstrate that building combined advice into Jikes RVM from different application executions improves performance, regardless of the application Jikes RVM is compiling and executing. This build-time advice thus gives user applications some benefits of pretenuring, without any application profiling. No previous work uses profile feedback to pretenure in the runtime system. (3) We find that application-only advice also consistently improves performance, but that the combination of build-time and application-specific advice is almost always noticeably better. (4) Our same advice improves the performance of generational, Older First, and Beltway collectors, illustrating that it is collector neutral. (5) We include an immortal allocation space in addition to a nursery and older generation, and show that pretenuring to immortal space has substantial benefit.

References

  1. Agesen, O. and Garthwaite, A. 2000. Efficient object sampling via weak references. In Proceedings of the International Symposium on Memory Management. Minneapolis, MN, 121--127. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Alpern, B., Attanasio, D., Barton, J. J., Burke, M. G., P.Cheng, Choi, J.-D., Cocchi, A., Fink, S. J., Grove, D., Hind, M., Hummel, S. F., Lieber, D., Litvinov, V., Mergen, M., Ngo, T., Russell, J. R., Sarkar, V., Serrano, M. J., Shepherd, J., Smith, S., Sreedhar, V. C., Srinivasan, H., and Whaley, J. 2000. The Jalapeño virtual machine. IBM Syst. J. 39, 1 (Feb.), 211--238. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Alpern, B., Attanasio, D., Barton, J. J., Cocchi, A., Hummel, S. F., Lieber, D., Mergen, M., Ngo, T., Shepherd, J., and Smith, S. 1999. Implementing Jalapeño in Java. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications. Denver, CO, 314--324. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Appel, A. W. 1989. Simple generational garbage collection and fast allocation. Softw. Pract. Exper. 19, 2, 171--183. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Arnold, M., Fink, S. J., Grove, D., Hind, M., and Sweeney, P. 2000. Adaptive optimization in the Jalapeño JVM. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications. Minneapolis, MN, 47--65. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Barrett, D. A. and Zorn, B. 1993. Using lifetime predictors to improve memory allocation performance. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). Albuquerque, NM, 187--196. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Barrett, D. A. and Zorn, B. 1995. Garbage collection using a dynamic threatening boundary. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). La Jolla, CA, 301--314. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Blackburn, S. M., Cheng, P., and McKinley, K. S. 2004b. Myths and realities: The performance impact of garbage collection. In ACM SIGMETRICS Conference on Measurement and Modeling Computer Systems. New York, 25--36. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Blackburn, S. M., Cheng, P., and McKinley, K. S. 2004a. Oil and water? High performance garbage collection in Java with JMTk. In Proceedings of the International Conference on Software Engineering. New York, Scotland, UK, 137--146. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Blackburn, S. M., Jones, R., McKinley, K. S., and Moss, J. E. B. 2002. Beltway: Getting around garbage collection gridlock. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). Berlin, Germany, 153--164. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Blackburn, S. M., Singhai, S., Hertz, M., McKinley, K. S., and Moss, J. E. B. 2001. Pretenuring for Java. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA). Tampa, FL, 342--352. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Boehm, H.-J. 2002. Bounding space usage of conservative garbage collectors. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). New York, 93--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Cahoon, B. and McKinley, K. S. 2001. Data flow analysis for software prefetching linked data structures in Java. In The International Conference on Parallel Architectures and Compilation Techniques. Barcelona, Spain, 280--291. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Caudill, P. J. and Wirfs-Brock, A. 1986. A third-generation Smalltalk-80 implementation. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications. Portland, OR, 119--130. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Cheng, P., Harper, R., and Lee, P. 1998. Generational stack collection and profile-driven pretenuring. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). Montreal, Canada, 162--173. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Demers, A., Weiser, M., Hayes, B., Boehm, H., Bobrow, D., and Shenker, S. 1990. Combining generational and conservative garbage collection: Framework and implementations. In Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). New York, 261--269. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Eeckhout, L., Georges, A., and Bosschere, K. D. 2003. How Java programs interact with virtual machines at the microarchitectural level. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications. Anaheim, CA, 169--186. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Hanson, D. R. 1990. Fast allocation and deallocation of memory based on object liftimes. Softw. Pract. Exper. 20, 1 (Jan.), 5--12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Harris, T. L. 2000. Dynamic adaptive pre-tenuring. In Proceedings of the International Symposium On Memory Management (ISMM). Minneapolois, MN, 127--136. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Hertz, M., Blackburn, S. M., Moss, J. E. B., McKinley, K. S., and Stefanović, D. 2002. Error-Free garbage collection traces: How to cheat and not get caught. In Proceedings of the International Conference on Measurement and Modeling of Computer Systems (ACM SIGMETRICS). Marina del Rey, CA, 140--151. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Hertz, M., Blackburn, S. M., Moss, J. E. B., McKinley, K. S., and Stefanović, D. 2006. Generating object lifetime traces with Merlin. ACM Trans. Programm. Lang. Syst. 28, 3 (May), 476--516. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Hicks, M., Hornof, L., Moore, J. T., and Nettles, S. 1998. A study of large object spaces. In ISMM Proceedings of the 1st International Symposium on Memory Management. Vancouver, BC, 138--145. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Huang, X., Wang, Z., Blackburn, S. M., McKinley, K. S., Moss, J. E. B., and Cheng, P. 2004. The garbage collection advantage: Improving mutator locality. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications. Vancouver, BC, 69--80. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Jump, M., Blackburn, S. M., and McKinley, K. S. 2004. Dynamic object sampling for pretenuring. In Proceedings of the 4th International Symposium on Memory Management (ISMM). New York, 152--162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Lee, H. B. and Zorn, B. G. 1997. BIT: A tool for instrumenting Java bytecodes. In USENIX Symposium on Internet Technologies and Systems. Monterey, CA, 73--82. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Lieberman, H. and Hewitt, C. E. 1983. A real time garbage collector based on the lifetimes of objects. Commun. ACM 26, 6, 419--429. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Rogers, A., Carlisle, M. C., Reppy, J. H., and Hendren, L. J. 1995. Supporting dynamic data structures on distributed-memory machines. ACM Trans. Programm. Lang. Syst. 17, 2 (Mar.), 233--263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Seidl, M. L. and Zorn, B. G. 1998. Segregating heap objects by reference behavior and lifetime. In ASPLOS-VIII Proceedings of the 8th International Conference on Architectural Support for Programming Languages and Operating Systems. San Jose, CA, 12--23. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Stefanović, D., Hertz, M., Blackburn, S. M., McKinley, K., and Moss, J. E. B. 2002. Older-First garbage collection in practice: Evaluation in a Java virtual machine. In Proceedings of the SIGPLAN Workshop on Memory System Performance. Berlin, Germany. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Stefanović, D., McKinley, K. S., and Moss, J. E. B. 1999. Age-Based garbage collection. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA). Denver, CO, 379--381. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Tarditi, D. and Diwan, A. 1996. Measuring the cost of storage management. Lisp Symb. Comput. 9, 4 (Dec.), 323--342. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Ungar, D. 1984. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. In Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments. Pittsburgh, PA, 157--167. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Ungar, D. and Jackson, F. 1988. Tenuring policies for generation-based storage reclamation. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA), N. K. Meyrowitz, Ed. San Diego, CA, 1--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Ungar, D. and Jackson, F. 1992. An adaptive tenuring policy for generation scavengers. ACM Trans. Program. Lang. Syst. 14, 1, 1--27. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Yang, T., Hertz, M., Berger, E. D., Kaplan, S. F., and Moss, J. E. B. 2004. Automatic heap sizing: Taking real memory into account. In Proceedings of the International Symposium on Memory Management. Vancouver, BC, 61--72. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Zorn, B. 1989. Comparative performance evaluation of garbage collection algorithms. Ph.D. thesis, Computer Science Department, University of California, Berkeley. Available as Tech. Rep. UCB/CSD 89/544. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Profile-based pretenuring

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

Full Access

  • Published in

    cover image ACM Transactions on Programming Languages and Systems
    ACM Transactions on Programming Languages and Systems  Volume 29, Issue 1
    January 2007
    273 pages
    ISSN:0164-0925
    EISSN:1558-4593
    DOI:10.1145/1180475
    Issue’s Table of Contents

    Copyright © 2007 ACM

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 1 January 2007
    Published in toplas Volume 29, Issue 1

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader
About Cookies On This Site

We use cookies to ensure that we give you the best experience on our website.

Learn more

Got it!