10.1145/349299.349326acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedings
Article

A framework for interprocedural optimization in the presence of dynamic class loading

ABSTRACT

Dynamic class loading during program execution in the Java Programming Language is an impediment for generating code that is as efficient as code generated using static whole-program analysis and optimization. Whole-program analysis and optimization is possible for languages, such as C++, that do not allow new classes and/or methods to be loaded during program execution. One solution for performing whole-program analysis and avoiding incorrect execution after a new class is loaded is to invalidate and recompile affected methods. Runtime invalidation and recompilation mechanisms can be expensive in both space and time, and, therefore, generally restrict optimization.

To address these drawbacks, we propose a new framework, called the extant analysis framework, for interprocedural optimization of programs that support dynamic class (or method)loading. Given a set of classes comprising the closed world, we perform an offline static analysis which partitions references into two categories:(1) unconditionally extant references which point only to objects whose runtime type is guaranteed to be in the closed world; and (2) conditionally extant references which point to objects whose runtime type is not guaranteed to be in the closed world. Optimizations solely dependent on the first categorycan be statically performed, and are guaranteed to be correct even with any future class/method loading. Optimizations dependent on the second category are guarded by dynamic tests, called extant safety tests, for correct execution behavior.We describe the properties for extant safety tests, and provide algorithms for their generation and placement.

References

  1. 1.B. Alpern, D. Attanasio, J. J. Barton, A. Cocchi, D. Lieber, S. Smith, and T. Ngo. Implementing Jalapeno no in Java. In ACM Conference on Object- Oriented Programming Systems, Languages, and Applications, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.B. Alpern, M. Charney, J.-D. Choi, T. Cocchi, and D. Lieber. Dynamic linking on a shared-memory multiprocessor. In International Conference onParallel Architectures and Compilation Techniques, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.D. F. Bacon and P. F. Sweeney. Fast static analysis of C++ virtual function calls. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 324-341, Oct. 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.S. Baylor, M. Devarakonda, S. Fink, E. Gluzberg, M. Kalantar, P. Muttineni, E. Barsness, R. Arora, R. Dimpsey, and S. Munroe. Java server benchmarks. IBM Systems Journal Special Issue on Java Performance, 39(1), 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.M. Burke and L. Torczon. Interprocedural optimization: Eliminating unnecessary recompilation. ACM Transactions on Programming Languages and Systems, 15(3):367-399, July 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.C. Chambers. The Design and Implementation of the Self Compiler, an Optimizing Compiler for Object- Oriented Programming Languages. PhD thesis, Stanford University, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.D. R. Chase, M. Wegman, and F. K. Zadeck. Analysis of pointers and structures. In SIGPLAN '90 Conference on Programming Language Design and Implementation, pages 296-310, June 1990. SIGPLAN Notices 25(6).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.R. Chatterjee, B. G. Ryder, and W. A. Landi. Relevant context inference. In 26th Annual ACM SIGACT- SIGPLAN Symposium on the Principles of Programming Languages, Jan. 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.J.-D. Choi, M. Burke, and P. Carini. Efficient low-sensitive interprocedural computation of pointerinduced aliases and side effects. In 20th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 232-245, Jan. 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.J.-D. Choi, R. Cytron, and J. Ferrante. Automatic construction of sparse data ow evaluation graphs. In 18th Annual ACM Symposium on the Principles of Programming Languages, pages 55-66, Jan. 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.J.-D. Choi, M. Gupta, M. Serrano, V. C. Sreedhar, and S. Midkiff. Escape analysis for Java. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.C. Consel and F. Noel. A general approach for run-time specialization and its application to C. In In 1996 ACM Symposium on Principles of Programming Languages, pages 145-156. ACM, January 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, andF. K. Zadeck. An efficient method for computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451-490, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.J. Dean, C. Chambers, and D. Grove. Selective specialization for object-oriented languages. In SIGPLAN '95 Conference onProgramming Language Design and Implementation, pages 93-102, June 1995. SIGPLAN Notices, 30(6).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.D. Detlefs and O. Agesen. Inlining of virtual methods. In the 13 European Conference on Object-Oriented Programming, pages 258-278, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.M. Emami, R. Ghiya, and L. J. Hendren. Contextsensitive interprocedural points-to analysis in the presence of function pointers. In SIGPLAN '94 Conference on Programming Language Design and Implementation, pages 242-256, June 1994. SIGPLAN Notices, 29(6).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.R. Fitzgerald, T. B. Knoblock, E. Ruf, B. Steensgaard, and D. Tarditi. Marmot: An optimizing compiler for Java. Technical Report MSR-TR-99-33, Microsoft Research, June 1999.]]Google ScholarGoogle Scholar
  18. 18.J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison Wesley, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.U. Holzle, C. Chambers, and D. Ungar. Debugging optimized code with dynamic deoptimization. In SIGPLAN '92 Conference onProgramming Language Design and Implementation, June 1992. SIGPLAN Notices 27(6).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.U. Holzle and D. Ungar. Optimizing dynamicallydispatched calls with run-time type feedback. In SIG- PLAN '94 Conference onProgramming Language Design and Implementation, pages 326-336, June 1994. SIGPLAN Notices, 29(6).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.U. Holzle and D. Ungar. A third generation self implementation: Reconciling responsiveness with performance. In ACM Conference onObject-Oriented Programming Systems, Languages, and Applications, pages 229-243, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.IBM Corporation. IBM High Performance Compiler for Java, 1997. See http://www.alphaWorks.ibm.com/formula/hpc.]]Google ScholarGoogle Scholar
  23. 23.K. Ishizaki, M. Kawahito, T. Yasue, M. Takeuchi, T. Ogasawara, T. Suganuma, T. Onodera, H. Komatsu, and T. Nakatani. Design, implementation, and evaluation of optimizations in a just-in-time compiler. In ACM 1999 Java Grande Conference, pages 119-128, June 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.W. Landi and B. Ryder. A safe approximate algorithm for interprocedural pointer aliasing. In SIGPLAN '92 Conference onProgramming Language Design and Implementation, pages 235-248, June 1992. SIGPLAN Notices 27(6).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.S. Liang and G. Bracha. Dynamic class loading in the Java virtual machine. In ACM Conference onObject- Oriented Programming Systems, Languages, and Applications. ACM, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.T. Lindholm and F. Yellin. The Java Virtual Machine Specification. The Java Series. Addison-Wesley, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.S. Meloan. The java hotspot{tm} performance engine: An in-depth look, 1999.]]Google ScholarGoogle Scholar
  28. 28.NaturalBridge. BulletTrain optimizing compiler and runtime for JVM bytecodes, 1996. See http://www.naturalbridge.com.]]Google ScholarGoogle Scholar
  29. 29.A. Rountev, B. Ryder, and W. Landi. Data ow analysis of program fragments. In Proceedings of the 7th Symposium on the Foundations of Software Engineering, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30.M. Sagiv, T. Reps, and R. Wilhelm. Solving shapeanalysis problems in languages with destructive updating. ACM Transactions on Programming Languages and Systems, 20(1):1-50, Jan. 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31.V. Saraswat. Java is not type-safe, 1997. Information available in Web page at http://www.research.att.com/vj/bug.html.]]Google ScholarGoogle Scholar
  32. 32.B. Steensgaard. Points-to analysis in almost linear time. In 23rd Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 32- 41, Jan. 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33.F. Tip, C. Laffra, P. F.Sweeney, and D. Streeter. Practical experience with an application extractor for Java. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Nov. 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 34.R. P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for C programs. In SIGPLAN '95 Conference onProgramming Language Design and Implementation, pages 1-12, June 1995. SIGPLAN Notices, 30(6).]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A framework for interprocedural optimization in the presence of dynamic class loading

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          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!