skip to main content
research-article

Resurrector: a tunable object lifetime profiling technique for optimizing real-world programs

Published:29 October 2013Publication History
Skip Abstract Section

Abstract

Modern object-oriented applications commonly suffer from severe performance problems that need to be optimized away for increased efficiency and user satisfaction. Many existing optimization techniques (such as object pooling and pretenuring) require precise identification of object lifetimes. However, it is particularly challenging to obtain object lifetimes both precisely and efficiently: precise profiling techniques such as Merlin introduce several hundred times slowdown even for small programs while efficient approximation techniques often sacrifice precision and produce less useful lifetime information. This paper presents a tunable profiling technique, called Resurrector, that explores the middle ground between high precision and high efficiency to find the precision-efficiency sweetspot for various livenessbased optimization techniques. Our evaluation shows that Resurrector is both more precise and more efficient than the GC-based approximation, and it is orders-of-magnitude faster than Merlin. To demonstrate Resurrector's usefulness, we have developed client analyses to find allocation sites that create large data structures with disjoint lifetimes. By inspecting program source code and reusing data structures created from these allocation sites, we have achieved significant performance gains. We have also improved the precision of an existing optimization technique using the lifetime information collected by Resurrector.

References

  1. Websphere application server development best practices for performance and scalability. http://www-3.ibm.com/software/webservers/appserv/ws_bestpractices.pdf.Google ScholarGoogle Scholar
  2. J. R. Allen. Anatomy of LISP. McGraw-Hill, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. E. Altman, M. Arnold, S. Fink, and N. Mitchell. Performance analysis of idle programs. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 739--753, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon, C. R. Attanasio, H. B. Lee, V. T. Rajan, and S. Smith. Java without the coffee breaks: a nonintrusive multi-processor garbage collector. In ACMSIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 92--103, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. F. Bacon, P. Cheng, and V. T. Rajan. A unified theory of garbage collection. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 50--68, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. F. Bacon and V. T. Rajan. Concurrent cycle collection in reference counted systems. In European Conference on Object-Oriented Programming (ECOOP), pages 207--235, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Bhattacharya, M. Nanda, K. Gopinath, and M. Gupta. Reuse, recycle to de-bloat software. In European Conference on Object-Oriented Programming (ECOOP), pages 408--432, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. S. Bird. An introduction to the theory of lists. In Logic of Programming and Calculi of Discrete Design, pages 5--42, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 169--190, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. M. Blackburn, M. Hertz, K. S. Mckinley, J. E. B. Moss, and T. Yang. Profile-based pretenuring. ACM Transactions on Programming Languages and Systems, 29(1), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. M. Blackburn and K. S. McKinley. Ulterior reference counting: fast garbage collection without a long wait. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 344--358, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. M. Blackburn, S. Singhai, M. Hertz, K. S. McKinely, and J. E. B. Moss. Pretenuring for Java. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 342--352, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. B. Blanchet. Escape analysis for object-oriented languages. Applications to Java. In ACMSIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 20--34, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Cheng, R. Harper, and P. Lee. Generational stack collection and profile-driven pretenuring. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 162--173, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. A. E. Chis, N. Mitchell, E. Schonberg, G. Sevitsky, P. O'Sullivan, T. Parsons, and J. Murphy. Patterns of memory inefficiency. In European Conference on Object-Oriented Programming (ECOOP), pages 383--407, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Choi, M. Gupta, M. Serrano, V. Sreedhar, and S. Midkiff. Escape analysis for Java. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 1--19, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. G. E. Collins. A method for overlapping and erasure of lists. Communications of the ACM, 3(12):655--657, Dec. 1960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. L. P. Deutsch and D. G. Bobrow. An efficient, incremental, automatic garbage collector. Commun. ACM, 19(9):522--526, Sept. 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Domani, G. Goldshtein, E. K. Kolodner, E. Lewis, E. Petrank, and D. Sheinwald. Thread-local heaps for Java. In International Symposium on Memory Management (ISMM), pages 76--87, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. B. Dufour, B. G. Ryder, and G. Sevitsky. A scalable technique for characterizing the usage of temporaries in framework-intensive Java applications. In ACM SIGSOFT International Symposium on the Foundations of Software Engineering (FSE), pages 59--70, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Gay and B. Steensgaard. Fast escape analysis and stack allocation for object-based programs. In International Conference on Compiler Construction (CC), LNCS 1781, pages 82--93, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. O. Gheorghioiu, A. Salcianu, and M. Rinard. Interprocedural compatibility analysis for static object preallocation. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 273--284, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Gil and Y. Shimron. Smaller footprint for Java collections. In European Conference on Object-Oriented Programming (ECOOP), pages 356--382, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. E. Goto. Monocopy and associative algorithms in an extended lisp. Technical Report 74-03, Information Science Laboratory, University of Tokyo, 1974.Google ScholarGoogle Scholar
  25. S. Z. Guyer, K. S. McKinley, and D. Frampton. Free-Me: a static analysis for automatic individual object reclamation. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 364--375, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. Hertz, S.M. Blackburn, J. E. B.Moss, K. S.McKinley, and D. Stefanović. Generating object lifetime traces with Merlin. ACM Transactions on Programming Languages and Systems, 28(3):476--516, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Jikes Research Virtual Machine. http://jikesrvm.org.Google ScholarGoogle Scholar
  28. P. G. Joisha. Compiler optimizations for nondeferred reference: counting garbage collection. In International Symposium on Memory Management (ISMM), pages 150--161, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. P. G. Joisha. Overlooking roots: a framework for making nondeferred reference-counting garbage collection fast. In International Symposium on Memory Management (ISMM), pages 141--158, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. P. G. Joisha. A principled approach to nondeferred reference-counting garbage collection. In VEE, pages 131--140, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R. Jones and C. Ryder. Garbage collection should be lifetime aware. In International Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS), 2006.Google ScholarGoogle Scholar
  32. D. Marinov and R. O'Callahan. Object equality profiling. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 313--325, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. S. Marion, R. Jones, and C. Ryder. Decrypting the Java gene pool. In International Symposium on Memory Management (ISMM), pages 67--78, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. D. Michie. "memo" functions and machine learning. Nature, page 218, 1968.Google ScholarGoogle Scholar
  35. N. Mitchell. The runtime structure of object ownership. In European Conference on Object-Oriented Programming (ECOOP), pages 74--98, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. N. Mitchell, E. Schonberg, and G. Sevitsky. Making sense of large heaps. In European Conference on Object-Oriented Programming (ECOOP), pages 77--97, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. N. Mitchell, E. Schonberg, and G. Sevitsky. Four trends leading to Java runtime bloat. IEEE Software, 27(1):56--63, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. N. Mitchell and G. Sevitsky. The causes of bloat, the limits of health. ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 245--260, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. N. Mitchell, G. Sevitsky, and H. Srinivasan. Modeling runtime behavior in framework-based applications. In European Conference on Object-Oriented Programming (ECOOP), pages 429--451, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. N. P. Ricci, S. Z. Guyer, and J. E. B. Moss. Elephant tracks: generating program traces with object death records. In International Conference on Principles and Practice of Programming in Java (PPPJ), pages 139--142, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. N. P. Ricci, S. Z. Guyer, and J. E. B. Moss. Elephant tracks: portable production of complete and precise GC traces. In International Symposium on Memory Management (ISMM), pages 109--118, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. A. Sewe, D. Yuan, J. Sinschek, and M. Mezini. Headroom-based pretenuring: dynamically pretenuring objects that live "long enough". In International Conference on Principles and Practice of Programming in Java (PPPJ), pages 29--38, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. O. Shacham, M. Vechev, and E. Yahav. Chameleon: Adaptive selection of collections. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 408--418, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. A. Shankar, M. Arnold, and R. Bodik. JOLT: Lightweight dynamic analysis and removal of object churn. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 127--142, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. J. Singer, G. Brown, I. Watson, and J. Cavazos. Intelligent selection of application-specific garbage collectors. In International Symposium on Memory Management (ISMM), pages 91--102, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. S. C. Vestal. Garbage collection: an exercise in distributed, fault-tolerant programming. PhD thesis, Seattle, WA, USA, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. J. Weizenbaum. Knotted list structures. Communications of the ACM, 5(3):161--165, Mar. 1962. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. J. Whaley and M. Rinard. Compositional pointer and escape analysis for Java programs. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 187--206, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. F. Xian, W. Srisa-an, and H. Jiang. Allocation-phase aware thread scheduling policies to improve garbage collection performance. In International Symposium on Memory Management (ISMM), pages 79--90, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. G. Xu. Finding reusable data structures. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 1017--1034, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. G. Xu. CoCo: Sound and adaptive replacement of Java collections. In European Conference on Object-Oriented Programming (ECOOP), pages 1--26, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. G. Xu, M. Arnold, N. Mitchell, A. Rountev, E. Schonberg, and G. Sevitsky. Finding low-utility data structures. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 174--186, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. G. Xu, M. Arnold, N. Mitchell, A. Rountev, and G. Sevitsky. Go with the flow: Profiling copies to find runtime bloat. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 419--430, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. G. Xu, M. D. Bond, F. Qin, and A. Rountev. LeakChaser: Helping programmers narrow down causes of memory leaks. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 270--282, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. G. Xu, N. Mitchell, M. Arnold, A. Rountev, and G. Sevitsky. Software bloat analysis: Finding, removing, and preventing performance problems in modern large-scale object-oriented applications. In FSE/SDP Working Conference on the Future of Software Engineering Research (FoSER), pages 421--426, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. G. Xu and A. Rountev. Precise memory leak detection for Java software using container profiling. In International Conference on Software Engineering (ICSE), pages 151--160, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. G. Xu and A. Rountev. Detecting inefficiently-used containers to avoid bloat. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 160--173, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. G. Xu, D. Yan, and A. Rountev. Static detection of loop-invariant data structures. In European Conference on Object-Oriented Programming (ECOOP), pages 738--763, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Resurrector: a tunable object lifetime profiling technique for optimizing real-world programs

        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 SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 48, Issue 10
          OOPSLA '13
          October 2013
          867 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2544173
          Issue’s Table of Contents
          • cover image ACM Conferences
            OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
            October 2013
            904 pages
            ISBN:9781450323741
            DOI:10.1145/2509136

          Copyright © 2013 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 29 October 2013

          Check for updates

          Qualifiers

          • research-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!