Skip to main content

Reuse, Recycle to De-bloat Software

  • Conference paper
ECOOP 2011 – Object-Oriented Programming (ECOOP 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6813))

Included in the following conference series:

Abstract

Most Java programmers would agree that Java is a language that promotes a philosophy of “create and go forth”. By design, temporary objects are meant to be created on the heap, possibly used and then abandoned to be collected by the garbage collector. Excessive generation of temporary objects is termed “object churn” and is a form of software bloat that often leads to performance and memory problems. To mitigate this problem, many compiler optimizations aim at identifying objects that may be allocated on the stack. However, most such optimizations miss large opportunities for memory reuse when dealing with objects inside loops or when dealing with container objects.

In this paper, we describe a novel algorithm that detects bloat caused by the creation of temporary container and String objects within a loop. Our analysis determines which objects created within a loop can be reused. Then we describe a source-to-source transformation that efficiently reuses such objects. Empirical evaluation indicates that our solution can reduce upto 40% of temporary object allocations in large programs, resulting in a performance improvement that can be as high as a 20% reduction in the run time, specifically when a program has a high churn rate or when the program is memory intensive and needs to run the GC often.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Mitchell, N., Schonberg, E., Sevitsky, G.: Four trends leading to java runtime bloat. IEEE Software 27(1), 56–63 (2010)

    Article  Google Scholar 

  2. Xu, G., Mitchell, N., Arnold, M., Rountev, A., Sevitsky, G.: Software bloat analysis: Finding, removing, and preventing performance problems in modern large-scale object-oriented applications. In: Future of Software Engineering Research (2010)

    Google Scholar 

  3. Shirazi, J.: Java performance tuning. O’Reilly, Sebastopol (2003)

    Google Scholar 

  4. Blackburn, S., et al.: The DaCapo benchmarks: Java benchmarking development and analysis. In: Object-Oriented Programming, Systems, Languages and Applications, OOPSLA (2006)

    Google Scholar 

  5. Nanda, M.G., Sinha, S.: Accurate interprocedural null-dereference analysis for Java. In: Proc. of the 31st Intl. Conf. on Softw., pp. 133–143 (2009)

    Google Scholar 

  6. Zhao, Y., Shi, J., Zheng, K., Wang, H., Lin, H., Shao, L.: Allocation wall: a limiting factor of java applications on emerging multi-core platforms. In: Object-Oriented Programming, Systems, Languages and Applications, OOPSLA (2009)

    Google Scholar 

  7. Shankar, A., Arnold, M., Bodik, R.: Jolt: lightweight dynamic analysis and removal of object churn. In: Object-Oriented Programming, Systems, Languages and Applications, OOPSLA (2008)

    Google Scholar 

  8. Guyer, S., McKinley, K., Frampton, D.: Free-me: A static analysis for automatic individual object reclamation. In: Programming Language Design and Implementation, PLDI (2006)

    Google Scholar 

  9. Choi, J.-D., Gupta, M., Serrano, M., Sreedhar, V.C., Midkiff, S.: Escape analysis for java. SIGPLAN Not. 34(10), 1–19 (1999)

    Article  Google Scholar 

  10. Blanchet, B.: Escape analysis for object-oriented languages: application to java. SIGPLAN Not. 34(10), 20–34 (1999)

    Article  Google Scholar 

  11. Gay, D., Steensgaard, B.: Fast escape analysis and stack allocation for object-based programs. In: International Conference on Compiler Construction (2000)

    Google Scholar 

  12. Whaley, J., Rinard, M.: Compositional pointer and escape analysis for java programs. SIGPLAN Not. 34(10), 187–206 (1999)

    Article  Google Scholar 

  13. Bacon, D.F., Cheng, P., Rajan, V.T.: A unified theory of garbage collection. SIGPLAN Not. 39(10), 50–68 (2004)

    Article  Google Scholar 

  14. Dufour, B., Ryder, B.G., Sevitsky, G.: A scalable technique for characterizing the usage of temporaries in framework-intensive java applications. In: SIGSOFT 2008/FSE-16, pp. 59–70 (2008)

    Google Scholar 

  15. Buytaert, D., Beyls, K., De Bosschere, K.: Hinting refactorings to reduce object creation in java. In: ACES, pp. 73–76 (2005)

    Google Scholar 

  16. Xian, F., Srisa-an, W., Jiang, H.: Microphase: an approach to proactively invoking garbage collection for improved performance. In: Object-Oriented Programming, Systems, Languages and Applications, OOPSLA (2007)

    Google Scholar 

  17. Cherem, S., Rugina, R.: Uniqueness inference for compile-time object deallocation. In: ISMM (2007)

    Google Scholar 

  18. Inoue, H., Komatsu, H., Nakatani, T.: A study of memory management for web-based applications on multicore processors. In: Programming Language Design and Implementation, PLDI (2009)

    Google Scholar 

  19. Mitchell, N., Srinivasan, H.: Modeling runtime behavior in framework-based applications. In: Hu, Q. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 429–451. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  20. Mitchell, N., Sevitsky, G.: The causes of bloat, the limits of health. In: Object-Oriented Programming, Systems, Languages and Applications, OOPSLA (2007)

    Google Scholar 

  21. Mitchell, N., Schonberg, E., Sevitsky, G.: Making sense of large heaps. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 77–97. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  22. Xu, G., Arnold, M., Mitchell, N., Rountev, A., Sevitsky, G.: Go with the flow: profiling copies to find runtime bloat. In: Programming Language Design and Implementation, PLDI (2010)

    Google Scholar 

  23. Xu, G., et al.: Finding low-utility data structures. In: Programming Language Design and Implementation, PLDI (2010)

    Google Scholar 

  24. Xu, G., Rountev, A.: Detecting inefficiently-used containers to avoid bloat. In: Programming Language Design and Implementation, PLDI (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bhattacharya, S., Nanda, M.G., Gopinath, K., Gupta, M. (2011). Reuse, Recycle to De-bloat Software. In: Mezini, M. (eds) ECOOP 2011 – Object-Oriented Programming. ECOOP 2011. Lecture Notes in Computer Science, vol 6813. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22655-7_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-22655-7_19

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-22654-0

  • Online ISBN: 978-3-642-22655-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics