Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/320384.320400acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article
Free access

Compositional pointer and escape analysis for Java programs

Published: 01 October 1999 Publication History

Abstract

This paper presents a combined pointer and escape analysis algorithm for Java programs. The algorithm is based on the abstraction of points-to escape graphs, which characterize how local variables and fields in objects refer to other objects. Each points-to escape graph also contains escape information, which characterizes how objects allocated in one region of the program can escape to be accessed by another region. The algorithm is designed to analyze arbitrary regions of complete or incomplete programs, obtaining complete information for objects that do not escape the analyzed regions.
We have developed an implementation that uses the escape information to eliminate synchronization for objects that are accessed by only one thread and to allocate objects on the stack instead of in the heap. Our experimental results are encouraging. We were able to analyze programs tens of thousands of lines long. For our benchmark programs, our algorithms enable the elimination of between 24% and 67% of the synchronization operations. They also enable the stack allocation of between 22% and 95% of the objects.

References

[1]
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, September 1999.
[2]
Lars Ole Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994.
[3]
B. Goldberg and Y. Park. Escape analysis on lists. In Proceedings of the SIGPLAN '92 Conference on Program Language Design and Implementation, pages 116- 127, July 1992.
[4]
H. Baker. Unifying and conquer (garbage, updating, aliasing ..) in functional languages. In Proceedings of the ACM Conference on Lisp and Functional Programming, pages 218-226, 1990.
[5]
B. Blanchet. Escape analysis: Correctness proof, implementation and experimental results. In Proceedings of the 25th Annual A CM Symposium on the Principles of Programming Languages, Paris, France, January 1998. ACM, ACM, New York.
[6]
B. Blanchet. Escape analysis for object oriented languages, application to java. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Denver, CO, November 1999.
[7]
J. Bodga and U. Hoelzle. Removing unnecessary synchronization in java. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Denver, CO, November 1999.
[8]
M. Burke, J. Choi, S. Fink, D. Grove, M. Hind, V. Sarkar, M. Serrano, V. Sreedhar, H. Srinivasan, and 3. Whaley. The jalapefio dynamic optimizing compiler for java. In Proceedings of the A CM SIGPLAN 1999 Java Grande Conference, June 1999.
[9]
R. Chatterjee, B. Ryder, and W. Landi. Relevant context inference. In Proceedings of the 26th Annual A CM Symposium on the Principles of Programming Languages, San Antonio, TX, January 1999.
[10]
J. Choi, M. Burke, and P. Carini. Efficient flow-sensitive interprocedural computation of pointerinduced aliases and side effects. In Conference Record of the Twentieth Annual Symposium on Principles of Programming Languages, Charleston, SC, January 1993. ACM.
[11]
J. Choi, M. Gupta, M. Serrano, V. Sreedhar, and S. Midkiff. Escape analysis for java. In Proceedings of the l~th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Denver, CO, November 1999.
[12]
J. Corbett. Using shape analysis to reduce finite-state models of concurrent java programs. In Proceedings of the International Symposium on Software Testing and Analysis, March 1998.
[13]
J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In Proceedings of the gth European Conference on Object-Oriented Programming, Aarhus, Denmark, August 1995.
[14]
A. Deutsch. On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications. In Proceedings of the 17th Annual A CM Symposium on the Principles of Programming Languages, pages 157-168, San Francisco, CA, January 1990. ACM, ACM, New York.
[15]
A. Deutsch. On the complexity of escape analysis, in Proceedings of the 24th Annual A CM Symposium on the Principles of Programming Languages, Paris, France, January 1997. ACM, ACM, New York.
[16]
P. Diniz and M. Rinard. Lock coarsening: Eliminating lock overhead in automatically parallelized objectbased programs. In Proceedings of the Ninth Workshop on Languages and Compilers for Parallel Computing, pages 285-299, San Jose, CA, August 1996. Springer- Verlag.
[17]
P. Diniz and M. Rinard. Synchronization transformations for parallel computing. In Proceedings of the 2~th Annual A CM Symposium on the Principles of Programming Languages, pages 187-200, Paris, France, January 1997. ACM, New York.
[18]
M. Emami, R. Ghiya, and L. Hendren. Contextsensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of the SIG- PLAN '94 Conference on Program Language Design and Implementation, pages 242-256, Orlando, FL, June 1994. ACM, New York.
[19]
J. Hannan. A type-based analysis for block allocation in functional languages. In Proceedings of the Second International Static Analysis Symposium. ACM, ACM, New York, September 1995.
[20]
W. Landi and B. Ryder. A safe approximation algorithm for interprocedural pointer aliasing. In Proceedings of the SIGPLAN '92 Conference on Program Language Design and Implementation, San Francisco, CA, June 1992.
[21]
J. Plevyak, X. Zhang, and A. Chien. Obtaining sequential efficiency for concurrent object-oriented languages. In Proceedings of the 2Pad Annual A CM Symposium on the Principles of Programming Languages, San Francisco, CA, January 1995. ACM, New York.
[22]
E. Ruf. Context-insensitive alias analysis reconsidered. In Proceedings of the SIGPLAN '95 Conference on Program Language Design and Implementation, La Jolla, CA, June 1995.
[23]
R. Rugina and M. Rinard. Pointer analysis for multithreaded programs. In Proceedings of the SIGPLAN '99 Conference on Program Language Design and Implementation, Atlanta, GA, May 1999.
[24]
M. Sagiv, T. Raps, and R. Wilhelm. Solving shapeanalysis problems in languages with destructive updating. A CM Transactions on Programming Languages and Systems, 20(1):1-50, January 1998.
[25]
P. Sathyanathan and M. Lain. Context-sensitive interprocedural pointer analysis in the presence of dynamic aliasing. In Proceedings of the Ninth Workshop on Languages and Compilers for Parallel Computing, San Jose, CA, August 1996. Springer-Verlag.
[26]
M. Shapiro and S. Horwitz. Fast and accurate flowinsensitive points-to analysis. In Proceedings of the 24th Annual A CM Symposium on the Principles of Programming Languages, Paris, France, January 1997.
[27]
Bjarne Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd Annual A CM Symposium on the Principles of Programming Languages, St. Petersburg Beach, FL, January 1996.
[28]
R. Wilson attd M. Lain. Efficient context-sensitive pointer analysis for C programs. In Proceedings of the SIGPLAN '95 Conference on Program Language Design and Implementation, La Jolla, CA, June 1995. ACM, New York.
[29]
Y. Tang and P. Jouvelot. Control-flow effects for escape analysis. In Workshop on Static Analysis, pages 313- 321, September 1992.

Cited By

View all
  • (2024)The ART of Sharing Points-to Analysis: Reusing Points-to Analysis Results Safely and EfficientlyProceedings of the ACM on Programming Languages10.1145/36898038:OOPSLA2(2606-2632)Online publication date: 8-Oct-2024
  • (2024)MEA2: A Lightweight Field-Sensitive Escape Analysis with Points-to Calculation for GolangProceedings of the ACM on Programming Languages10.1145/36897598:OOPSLA2(1362-1389)Online publication date: 8-Oct-2024
  • (2024)Reducing Write Barrier Overheads for Orthogonal PersistenceProceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3687997.3695646(210-223)Online publication date: 17-Oct-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

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
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 October 1999

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

OOPSLA99
Sponsor:

Acceptance Rates

OOPSLA '99 Paper Acceptance Rate 30 of 152 submissions, 20%;
Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)127
  • Downloads (Last 6 weeks)25
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)The ART of Sharing Points-to Analysis: Reusing Points-to Analysis Results Safely and EfficientlyProceedings of the ACM on Programming Languages10.1145/36898038:OOPSLA2(2606-2632)Online publication date: 8-Oct-2024
  • (2024)MEA2: A Lightweight Field-Sensitive Escape Analysis with Points-to Calculation for GolangProceedings of the ACM on Programming Languages10.1145/36897598:OOPSLA2(1362-1389)Online publication date: 8-Oct-2024
  • (2024)Reducing Write Barrier Overheads for Orthogonal PersistenceProceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3687997.3695646(210-223)Online publication date: 17-Oct-2024
  • (2024)Optimistic Stack Allocation and Dynamic Heapification for Managed RuntimesProceedings of the ACM on Programming Languages10.1145/36563898:PLDI(296-319)Online publication date: 20-Jun-2024
  • (2024)Partial program analysis for staged compilation systemsFormal Methods in System Design10.1007/s10703-024-00458-xOnline publication date: 13-Jun-2024
  • (2023)From Leaks to Fixes: Automated Repairs for Resource Leak WarningsProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616267(159-171)Online publication date: 30-Nov-2023
  • (2023)Hybrid Inlining: A Framework for Compositional and Context-Sensitive Static AnalysisProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3598042(114-126)Online publication date: 12-Jul-2023
  • (2023)IFDS-based Context Debloating for Object-Sensitive Pointer AnalysisACM Transactions on Software Engineering and Methodology10.1145/357964132:4(1-44)Online publication date: 27-May-2023
  • (2023)Memory leak detection using Heap Object Flow Graph (HOFG)Proceedings of the 16th Innovations in Software Engineering Conference10.1145/3578527.3578528(1-11)Online publication date: 23-Feb-2023
  • (2023)Frankenstein: fast and lightweight call graph generation for software buildsEmpirical Software Engineering10.1007/s10664-023-10388-729:1Online publication date: 16-Nov-2023
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media