A Framework for Optimizing Java Using Attributes

  • Patrice Pominville
  • Feng Qian
  • Raja Vallée-Rai
  • Laurie Hendren
  • Clark Verbrugge
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2027)

Abstract

This paper presents a framework for supporting the optimization of Java programs using attributes in Java class files. We show how class file attributes may be used to convey both optimization opportunities and profile information to a variety of Java virtual machines including ahead-of-time compilers and just-in-time compilers.We present our work in the context of Soot, a framework that supports the analysis and transformation of Java bytecode (class files)[21,25,26]. We demonstrate the framework with attributes for elimination of array bounds and null pointer checks, and we provide experimental results for the Kaffe just-in-time compiler, and IBM’s High Performance Compiler for Java ahead-of-time compiler.

References

  1. 1.
    Ana Azevedo, Joe Hummel, and Alex Nicolau. Java annotation-aware just-in-time (AJIT) compilation system. In Proceedings of the ACM 1999 Conference on Java Grande, pages 142–151, June 1999.Google Scholar
  2. 2.
    R. Bodik, R. Gupta, and V. Sarkar. ABCD: Eliminating Array Bounds Checks on Demand. In Proceedings of PLDI’ 00, pages 321–333, June 2000.Google Scholar
  3. 3.
    M. Cierniak and W. Li. Optimizing Java bytecodes. Concurrency, Practice and Experience, 9(6):427–444, 1997.CrossRefGoogle Scholar
  4. 4.
    Michal Cierniak, Guei-Yuan Lueh, and James M. Stichnoth. Practicing JUDO: Java under Dynamic Optimizations. In Proceedings of PLDI’ 00, pages 13–26, June 2000.Google Scholar
  5. 5.
    Geoff A. Cohen, Jeffrey S. Chase, and David L. Kaminsky. Automatic program transformation with JOIE. In Proceedings of the USENIX 1998 Annual Technical Conference, pages 167–178, Berkeley, USA, June 15–19 1998. USENIX Association.Google Scholar
  6. 6.
    Etienne M. Gagnon, Laurie J. Hendren, and Guillaume Marceau. Efficient inference of static types for Java bytecode. In Proceedings of SAS 2000, volume 1824 of LNCS, pages 199–219, June 2000.Google Scholar
  7. 7.
    S. Ghemawat, K.H. Randall, and D.J. Scales. Field Analysis: Getting Useful and Low-Cost Interprocedural Information. In Proceedings of PLDI’ 00, pages 334–344, June 2000.Google Scholar
  8. 8.
    R. Gupta. Optimizing array bound checks using flow analysis. ACM Letters on Programming Languages and Systems, 2(1–4):135–150, 1993.CrossRefGoogle Scholar
  9. 9.
    W. Harrison. Compiler analysis of the value ranges of variables. IEEE Transactions on Software Engineering, 3(3):243–250, 1977.CrossRefGoogle Scholar
  10. 10.
    Joseph Hummel, Ana Azevedo, David Kolson, and Alexandru Nicolau. Annotating the Java bytecodes in support of optimization. Concurrency: Practice and Experience, 9(11):1003–1016, November 1997.CrossRefGoogle Scholar
  11. 11.
    The Jasmin Bytecode Assembler. http://mrl.nyu.edu/meyer/jvm/jasmin.html.
  12. 12.
  13. 13.
    Joel Jones and Samuel Kamin. Annotating Java class files with virtual registers for performance. Concurrency: Practice and Experience, 12(6):389–406, 2000.CrossRefGoogle Scholar
  14. 14.
  15. 15.
    Priyadarshan Kolte and Michael Wolfe. Elimination of redundant array subscript range checks. In Proceedings of PLDI’ 95, pages 270–278, 1995.Google Scholar
  16. 16.
    Han Bok Lee and Benjamin G. Zorn. A tool for instrumenting Java bytecodes. In The USENIX Symposium on Internet Technologies and Systems, pages 73–82, 1997.Google Scholar
  17. 17.
    Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification. Addison-Wesley, Reading, MA, USA, second edition, 1999.Google Scholar
  18. 18.
    S. Midkiff, J. Moreira, and M. Snir. Optimizing bounds checking in Java programs. IBM Systems Journal, 37(3):409–453, August 1998.CrossRefGoogle Scholar
  19. 19.
    J.E. Moreira, S.P. Midkiff, and M. Gupta. A Standard Java Array Package for Technical Computing. In Proceedings of the Ninth SIAM Conference on Parallel Processing for Scientific Computing, San Antonio, TX, March 1999.Google Scholar
  20. 20.
    G. Necula. Proof-carrying code. In Proceedings of POPL’ 97, pages 106–119, January 1997.Google Scholar
  21. 21.
    Soot-a Java Optimization Framework. http://www.sable.mcgill.ca/soot/.
  22. 22.
    T. Suganuma, T. Ogasawara, M. Takeuchi, T. Yasue, M. Kawahito, K. Ishizaki, H. Komatsu, and T. Nakatani. Overview of the IBM Java Just-in-Time Compiler. IBM Systems Journal, 39(1):175–193, 2000.Google Scholar
  23. 23.
    Vijay Sundaresan, Laurie Hendren, Chrislain Razafimahefa, Raja Vallée-Rai, Patrick Lam, and Étienne Gagnon. Practical virtual method call resolution for Java. In Proceedings OOPSLA 2000, pages 264–280, October 2000.Google Scholar
  24. 24.
    Frank Tip, Chris Laffra, Peter F. Sweeney, and David Streeter. Practical experience with an application extractor for Java. In Proceedings OOPSLA’ 99, pages 292–305, October 1999.Google Scholar
  25. 25.
    Raja Vallee-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. Soot-a Java Bytecode Optimization Framework. In Proceedings of CASCON’ 99, pages 125–135, 1999.Google Scholar
  26. 26.
    Raja Vallée-Rai, Etienne Gagnon, Laurie Hendren, Patrick Lam, Patrice Pominville, and Vijay Sundaresan. Optimizing Java bytecode using the Soot framework: Is it feasible? In Proceedings of CC’ 00, volume 1781 of LNCS, pages 18–34, March 2000.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Patrice Pominville
    • 1
  • Feng Qian
    • 1
  • Raja Vallée-Rai
    • 1
  • Laurie Hendren
    • 1
  • Clark Verbrugge
    • 1
  1. 1.IBM Toronto LabSable Research Group, School of Computer Science, McGill UniversityUSA

Personalised recommendations