article

Data size optimizations for java programs

Abstract

We present a set of techniques for reducing the memory consumption of object-oriented programs. These techniques include analysis algorithms and optimizations that use the results of these analyses to eliminate fields with constant values, reduce the sizes of fields based on the range of values that can appear in each field, and eliminate fields with common default values or usage patterns. We apply these optimizations both to fields declared by the programmer and to implicit fields in the runtime object header. Although it is possible to apply these techniques to any object-oriented program, we expect they will be particularly appropriate for memory-limited embedded systems.We have implemented these techniques in the MIT FLEX compiler system and applied them to the programs in the SPECjvm98 benchmark suite. Our experimental results show that our combined techniques can reduce the maximum live heap size required for the programs in our benchmark suite by as much as 40%. Some of the optimizations reduce the overall execution time; others may impose modest performance penalties.

References

  1. O. Agesen, D. Detlefs, A. Garthwaite, R. Knippel, Y. Ramakrishna, and D. White. An efficient meta-lock for implementing ubiquitous synchronization. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, pages 207--222, Denver, Colorado, November 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Aneesh Aggarwal and Keith H. Randall. Related field analysis. In Proceedings of the ACM SIGPLAN '01 Conference on Programming Language Design and Implementation (PLDI), pages 214--220, Snowbird, Utah, June 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Aldrich, C. Chambers, E. Sirer, and S. Eggers. Static analyses for eliminating unnecessary synchronization from Java programs. In Proceedings of the 6th International Static Analysis Symposium, pages 19--38, September 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Scott Ananian. Silicon C: A hardware backend for SUIF. Available from http://flexc.lcs.mit.edu/SiliconC/paper.pdf, May 1998.]]Google ScholarGoogle Scholar
  5. C. Scott Ananian. The static single information form. Technical Report MIT-LCS-TR-801, Massachusetts Institute of Technology, 1999. Available from http://www.lcs.mit.edu/publications/pubs/pdf/MIT-LCS-TR-801.pdf.]]Google ScholarGoogle Scholar
  6. David F. Bacon, Stephen J. Fink, and David Grove. Space- and time-efficient implementation of the Java object model. In B. Magnusson, editor, Proceedings of the 16th European Conference on Object-Oriented Programming, volume 2374 of Lecture Notes in Computer Science, pages 111--132, Máalaga, Spain, June 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. David F. Bacon, Ravi Konuru, Chet Murthy, and Mauricio Serrano. Thin locks: Featherweight synchronization for Java. In Proceedings of the ACM SIGPLAN '98 Conference on Programming Language Design and Implementation (PLDI), pages 258--268, Montreal, Canada, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. David F. Bacon and Peter F. Sweeney. Fast static analysis of C++ virtual function calls. In Proceedings of the 11th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, pages 324--341, California, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jeff Bogda and Urs H. olzle. Removing unnecessary synchronization in Java. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, pages 35--46, Denver, Colorado, November 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Mihai Budiu, Majd Sakr, Kip Walker, and Seth Copen Goldstein. BitValue inference: Detecting and exploiting narrow bitwidth computations. In Proceedings of the 2000 Europar Conference, volume 1900 of Lecture Notes in Computer Science, Munich, Germany, August 2000. Springer Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jong-Deok Choi, Manish Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkiff. Escape analysis for Java. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, pages 1--19, Denver, Colorado, November 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Sylvia Dieckmann and Urs Hölzle. A study of the allocation behavior of the SPECjvm98 Java benchmarks. In Proceedings of the 13th European Conference on Object-Oriented Programming, August 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Nevin Heintze and Olivier Tardieu. Ultra-fast aliasinganalysis using CLA: A million lines of C code in a second. In Proceedings of the ACM SIGPLAN '01 Conference on Programming Language Design and Implementation (PLDI), pages 254--263, Snowbird, Utah, June 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Darko Marinov and Robert O'Callahan. Object equality profiling. Submitted to OOPSLA '03, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Tamiya Onodera and Kiyokuni Kawachiya. A study of locking objects with bimodal fields. In Proceedings ofthe 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, pages 223--237, Denver, Colorado, November 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Erik Ruf. Effective synchronization removal for Java. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), pages 208--218, Vancouver, Canada, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Radu Rugina and Martin Rinard. Symbolic bounds analysis of pointers, array indices, and accessed memory regions. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), pages 182--195, Vancouver, Canada, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Vugranam C. Sreedhar, Michael Burke, and Jong-Deok Choi. A framework for interprocedural optimization in the presence of dynamic class loading. In Proceedings of the ACM SIGPLAN '00 conference on Programming language design and implementation, pages 196--207. ACM Press, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Mark Stephenson, Jonathan Babb, and Saman Amarasinghe. Bitwidth analysis with application to silicon compilation. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), pages 108--120, Vancouver, Canada, June 2000.Mark Stephenson, Jonathan Babb, and Saman Amarasinghe. Bitwidth analysis with application to silicon compilation. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), pages 108--120, Vancouver, Canada, June 2000]] Google ScholarGoogle Scholar
  20. Alexandru Salcianu and Martin Rinard. Pointer and escape analysis for multithreaded programs. In Proceedings of the 8th ACM SIGPLAN symposium on Principles and Practice of Parallel Programming (PPoPP), pages 12--23, Snowbird, Utah, June 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Peter F. Sweeney and Frank Tip. A study of dead data members in C++ applications. In Proceedings of the ACM SIGPLAN '98 Conference on Programming Language Design and Implementation (PLDI), pages 324--332, Montreal, Canada, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Mark N. Wegman and F. Kenneth Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems, 13(2):181--210, April 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. John Whaley and Martin Rinard. Compositional pointer and escape analysis for Java programs. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, pages 187--206, Denver, Colorado, November 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Youtao Zhang and Rajiv Gupta. Data compression transformations for dynamically allocated data structures. In International Conference on Compiler Construction, volume 2304 of Lecture Notes in Computer Science, pages 14--28, Grenoble, France, April 2002. Springer Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Data size optimizations for java programs

                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

                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!