skip to main content
10.1145/1542476.1542523acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Go with the flow: profiling copies to find runtime bloat

Published:15 June 2009Publication History

ABSTRACT

Many large-scale Java applications suffer from runtime bloat. They execute large volumes of methods, and create many temporary objects, all to execute relatively simple operations. There are large opportunities for performance optimizations in these applications, but most are being missed by existing optimization and tooling technology. While JIT optimizations struggle for a few percent, performance experts analyze deployed applications and regularly find gains of 2x or more.

Finding such big gains is difficult, for both humans and compilers, because of the diffuse nature of runtime bloat. Time is spread thinly across calling contexts, making it difficult to judge how to improve performance. Bloat results from a pile-up of seemingly harmless decisions. Each adds temporary objects and method calls, and often copies values between those temporary objects. While data copies are not the entirety of bloat, we have observed that they are excellent indicators of regions of excessive activity. By optimizing copies, one is likely to remove the objects that carry copied values, and the method calls that allocate and populate them.

We introduce copy profiling, a technique that summarizes runtime activity in terms of chains of data copies. A flat copy profile counts copies by method. We show how flat profiles alone can be helpful. In many cases, diagnosing a problem requires data flow context. Tracking and making sense of raw copy chains does not scale, so we introduce a summarizing abstraction called the copy graph. We implement three clients analyses that, using the copy graph, expose common patterns of bloat, such as finding hot copy chains and discovering temporary data structures. We demonstrate, with examples from a large-scale commercial application and several benchmarks, that copy profiling can be used by a programmer to quickly find opportunities for large performance gains.

References

  1. G. Ammons, J.-D. Choi, M. Gupta, and N. Swamy. Finding and removing performance bottlenecks in large systems. In ECOOP, pages 172--196, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  2. M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. A survey of adaptive optimization in virtual machines. Proc. IEEE, 92(2):449--466, 2005.Google ScholarGoogle ScholarCross RefCross Ref
  3. T. Ball and J. Larus. Efficient path profiling. In MICRO, pages 46--57, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. M. Blackburn and et al. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. D. Bond and K. S. McKinley. Continuous path and edge profiling. In MICRO, pages 130--140, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. D. Bond, N. Nethercote, S. W. Kent, S. Z. Guyer, and K. S. McKinley. Tracking bad apples: reporting the origin of null and undefined value errors. In OOPSLA, pages 405--422, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Clause, W. Li, and A. Orso. Dytan: A generic dynamic taint analysis framework. In ISSTA, pages 196--206, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. B. Dufour, K. Driesen, L. Hendren, and C. Verbrugge. Dynamic metrics for Java. In OOPSLA, pages 149--168, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. B. Dufour, B. G. Ryder, and G. Sevitsky. Blended analysis for performance understanding of framework-based applications. In ISSTA, pages 118--128, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. B. Dufour, B. G. Ryder, and G. Sevitsky. A scalable technique for characterizing the usage of temporaries in framework-intensive Java applications. In FSE, pages 59--70, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. ej-technologies. JProfiler. www.ej-technologies.com.Google ScholarGoogle Scholar
  12. Java Development Blog. dld.blog-city.com.Google ScholarGoogle Scholar
  13. Java Heap Analyzer Tool (HAT). hat.dev.java.net.Google ScholarGoogle Scholar
  14. J. Larus. Whole program paths. In PLDI, pages 259--269, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. W. Masri and A. Podgurski. An empirical study of the strength of information flows in programs. In WODA, pages 73--80, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to analysis for Java. TOSEM, 14(1):1--41, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. N. Mitchell and G. Sevitsky. The causes of bloat, the limits of health. OOPSLA, pages 245--260, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. Mitchell, G. Sevitsky, and H. Srinivasan. Modeling runtime behavior in framework-based applications. In ECOOP, pages 429--451, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. N. Nethercote and J. Seward. How to shadow every byte of memory used by a program. In VEE, pages 65--74, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Newsome and D. Song. Dynamic taint analysis for automatic detection, analysis, and signature generation of exploits on commodity software. In NDSS, 2005.Google ScholarGoogle Scholar
  21. F. Qin, C. Wang, Z. Li, H. Kim, Y. Zhou, and Y. Wu. Lift: A low-overhead practical information flow tracking system for detecting security attacks. In MICRO, pages 135--148, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Quest Software. JProbe memory debugging. www.quest.com/jprobe.Google ScholarGoogle Scholar
  23. D. Rayside and L. Mendel. Object ownership profiling: a technique for finding and fixing memory leaks. In ASE, pages 194--203, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Shankar, M. Arnold, and R. Bodik. JOLT: Lightweight dynamic analysis and removal of object churn. In OOPSLA, pages 127--142, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. O. Shivers. Control-flow analysis in Scheme. In PLDI, pages 164--174, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. K. Srinivas and H. Srinivasan. Summarizing application performance from a component perspective. In FSE, pages 136--145, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Sun Java Forum. forums.java.net/jive/thread.jspa?messageID=180784.Google ScholarGoogle Scholar
  28. K. Vaswani, A. V. Nori, and T. M. Chilimbi. Preferential path profiling: Compactly numbering interesting paths. In POPL, pages 351--362, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. G. Xu and A. Rountev. Precise memory leak detection for Java software using container profiling. In ICSE, pages 151--160, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. W. Xu, S. Bhatkar, and R. Sekar. Taint-enhanced policy enforcement: a practical approach to defeat a wide range of attacks. In USENIX Security, pages 121--136, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. X. Zhang, N. Gupta, and R. Gupta. Pruning dynamic slices with confidence. In PLDI, pages 169--180, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. X. Zhang and R. Gupta. Cost effective dynamic program slicing. In PLDI, pages 94--106, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. X. Zhang and R. Gupta. Whole execution traces. In MICRO, pages 105--116, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. X. Zhang, R. Gupta, and Y. Zhang. Precise dynamic slicing algorithms. In ICSE, pages 319--329, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Go with the flow: profiling copies to find runtime bloat

      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
        PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation
        June 2009
        492 pages
        ISBN:9781605583921
        DOI:10.1145/1542476
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 44, Issue 6
          PLDI '09
          June 2009
          478 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1543135
          Issue’s Table of Contents

        Copyright © 2009 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 15 June 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate406of2,067submissions,20%

      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!