skip to main content
10.1145/320384.320387acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article
Free Access

Escape analysis for object-oriented languages: application to Java

Authors Info & Claims
Published:01 October 1999Publication History

ABSTRACT

Escape analysis [27, 14, 5] is a static analysis that determines whether the lifetime of data exceeds its static scope.

The main originality of our escape analysis is that it determines precisely the effect of assignments, which is necessary to apply it to object oriented languages with promising results, whereas previous work [27, 14, 5] applied it to functional languages and were very imprecise on assignments. Our implementation analyses the full Java™ Language.

We have applied our analysis to stack allocation and synchronization elimination. We manage to stack allocate 13% to 95% of data, eliminate more than 20% of synchronizations on most programs (94% and 99% on two examples) and get up to 44% speedup (21% on average). Our detailed experimental study on large programs shows that the improvement comes from the decrease of the garbage collection and allocation times than from improvements on data locality [7], contrary to what happened for ML [5].

References

  1. 1.AIKEN, A., FAHNDRICkl, M., AND LEVIEN, R. Better Static Memory Management: Improving Region-Based Analysis of Higher-Order Languages. In A CM SIG- PLAN Conference on Programming Language, Design and implementation (PLDI'95) (San Diego, California, June 1995), pp. 174-185.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.ALDRICH, J., CHAMBERS, C., SIRER, E. G., AND EG- GERS, S. Static Analyses for Eliminating Unnecessary Synchronization from Java Programs. In Static Analysis Symposium (SAS'99) (Sept. 1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.BIRgeDA~., L., TOFTE, M., AND VEJLSTRUP, ~/{. h'om Region Inference to von Neumann Machines via Region Representation Inference. In 23rd Annual A CM SIGPLAN-SIGA CT Symposium on Principles of Programming Languages (Jan. 1996), pp. 171-183.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.BLANCHET, B. Garbage Collection statique. DEA report, INRIA, Rocquencourt, Sept. 1996.]]Google ScholarGoogle Scholar
  5. 5.BLANcHET, B. Escape Analysis: Correctness Proof, Implementation and Experimental Results. In A CM SIGACT-SIGPLAN Conference on Principles of Programming Languages (POPL'98) (San Diego, California, Jan. 1998), ACM, pp. 25-37.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.BOGDA, J., AND HSLZLE, U. Removing Unnecessary Synchronization in Java. In Conference on Object- Oriented Programming, Systems, Languages and Applications (OOPSLA '99) (Nov. 1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.CARR, S., MCKINLEY, K. S., AND TSENG, C.-W. Compiler Optimizations for Improving Data Locality. In Sixth International Conference on Architectural Support for Programming Languages and Operating Systems (Oct. 1994), pp. 252- 262.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.CHASE, D. R. Safety considerations for storage allocation optimizations. In Proceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementa$ion (22-24 June I988), ACM Press, pp. 1 -10.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.CHOI, J.-D., GUPTA, M., SERRANO, M., SREEDHAR, V. C., AND MIDKIFF, S. Escape Analysis for Java. In Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA '99) (Nov. 1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.CoUSOT, P., AND COVSOT, R. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In 4th Annual A CM Symposium on Principles of Programming Languages (jan. 1977), pp. 238- 252.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.COUSOT, P., AND COUSOT, R. Systematic Design of Program Analysis Frameworks. In Sixth Annual A CM Symposium on Principles of Programming Languages (Jan. 1979), pp. 269 - 282.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.DEUTSCH, A. On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications. In Seventeenth Annual A CM $IGACT- SIGPLAN Symposium on Principles of Programming Languages (jan. 1990), pp. 157 ~ 168.]] Google ScholarGoogle Scholar
  13. 13.DEUTSCH, A. Interprocedural May-Alias Analysis for Pointers: Beyond k-limiting. In Proceedings of the SIGPLAN '94 Conference on Programming Language Design and Implementation (20-24 June 1994), ACM Press, pp. 230-- 241.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.De, UTSCH, A. On the Complexity of Escape Analysis. In 2~th Annual A CM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (Jan. 1997), pp. 358 - 371.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.GAy, D., AND STEENSGAARD, B. Stack Allocating Objects in Java. http://research.microsoft, com/apl.]]Google ScholarGoogle Scholar
  16. 16.HANNAN, J. A Type-based Analysis for Stack Allocation in Functional Languages. In Proceedings of the Second International Static Analysis Symposium (SAS '95) (Sept. 1995), vol. 983 of Lecture Notes in Computer Science, Springer, pp. 172- 188.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.HARRISON, W. The interprocedural analysis and automatic paxallelisation of Scheme programs. Lisp and Symbolic Computation 2 (1989), 176 - 396.]]Google ScholarGoogle ScholarCross RefCross Ref
  18. 18.HEDERMAN, L. Compile Time Garbage Collection Using Reference Count Analysis. Tech. l~ep. Rice COMP TR88-75, Rice University, Houston, Texas, Aug. 1988]]Google ScholarGoogle Scholar
  19. 19.HUDAK, P. A Semantic Model of Reference Counting and its Abstraction (Detailed Summary). In Proceedings of the 1986 A CM Conference on LISP and functional programming. (Aug. 1986), pp. 351 - 363.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.HUGHES, S. Compile-Time Garbage Collection for Higher-Order Functional Languages. J. Logic Computat. 2, 4 (1992), 483 - 509.]]Google ScholarGoogle Scholar
  21. 21.INOUE, K., SEKI, H., AND YAGI, H. Analysis of Functional Programs to Detect Run-Time Garbage Cells. A CM Transactions on Programming Languages and Systems 10, 4 (Oct. 1988), 555 - 578.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.JONES, N. D., AND MUCHNICK~ S. A flexible approach to interprocedural data flow analysis and programs with recursive data structures. In Nineth Annual A CM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (1982), pp. 66- 74.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.LINDHOLM, T., AND YELLIN, F. The JavaTM Virtual Machine Specification. Addison-Wesley, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.McDOWELL, C. E. Reducing garbage in Java. A CM Sigptan Notices 33, 9 (Sept. 1998), 84-86.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.MOHNEN, M. Efficient Closure Utilisation by Higher- Order Inheritance Analysis. In Static Analysis Symposium (SAS'95) (1995), vol. 983 of Lecture Notes in Computer Science, Springer, pp. 261 - 278.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.MOHNEN, M. Efficient Compile-Time Garbage Collection for Arbitrary Data Structure. In Symposium on Programming Language Implementation and Logic Programming (PLILP'95) (1995), vol. 982 of Lecture Notes in Computer Science, Springer, pp. 241-258.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.PARK, Y. G., AND GOLDBEKG, }3. Escape Analysis on Lists. In A OM SIGPLAN '9~ Conference on Programming Language Design and Implementation (17-19 July 1992), vol. 27, pp. 116- 127.]] Google ScholarGoogle Scholar
  28. 28.RUGGIEaI, C., AND MURTAGH, T. P. Lifetime Analysis of DynamicaUy Allocated Objects. In Fifteenth Annual A CM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (Jan. 1988), pp. 285- 293.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.SE:arthNO, M., AND FEELEY, M. Storage Use Analysis and its Applications. In 1996 ACM SIGPLAN International Conference on Functional Programming (May 1996), pp. 50-61.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30.StaYERS, O. Control flow analysis in Scheme. In ACM SIGPLAN Conference on Programming Language, Design and Implementation (jun 1988), pp. 164- 174.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31.TOFTE, M., AND TALPIN, J.-P. A theory of Stack Allocation in Polymorphically Typed Languages. Tech. Rep. 93/15, Departement of Computer Science, Copenhagen University, 9 July 1993.]]Google ScholarGoogle Scholar

Index Terms

  1. Escape analysis for object-oriented languages: application to Java

                  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
                    OOPSLA '99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
                    October 1999
                    462 pages
                    ISBN:1581132387
                    DOI:10.1145/320384

                    Copyright © 1999 ACM

                    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 1 October 1999

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • Article

                    Acceptance Rates

                    OOPSLA '99 Paper Acceptance Rate30of152submissions,20%Overall Acceptance Rate268of1,244submissions,22%

                    Upcoming Conference

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader