Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Escape analysis for object-oriented languages: application to Java

Published: 01 October 1999 Publication 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]
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.]]
[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).]]
[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.]]
[4]
BLANCHET, B. Garbage Collection statique. DEA report, INRIA, Rocquencourt, Sept. 1996.]]
[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.]]
[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).]]
[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.]]
[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.]]
[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).]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[15]
GAy, D., AND STEENSGAARD, B. Stack Allocating Objects in Java. http://research.microsoft, com/apl.]]
[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.]]
[17]
HARRISON, W. The interprocedural analysis and automatic paxallelisation of Scheme programs. Lisp and Symbolic Computation 2 (1989), 176 - 396.]]
[18]
HEDERMAN, L. Compile Time Garbage Collection Using Reference Count Analysis. Tech. l~ep. Rice COMP TR88-75, Rice University, Houston, Texas, Aug. 1988]]
[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.]]
[20]
HUGHES, S. Compile-Time Garbage Collection for Higher-Order Functional Languages. J. Logic Computat. 2, 4 (1992), 483 - 509.]]
[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.]]
[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.]]
[23]
LINDHOLM, T., AND YELLIN, F. The JavaTM Virtual Machine Specification. Addison-Wesley, 1996.]]
[24]
McDOWELL, C. E. Reducing garbage in Java. A CM Sigptan Notices 33, 9 (Sept. 1998), 84-86.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[30]
StaYERS, O. Control flow analysis in Scheme. In ACM SIGPLAN Conference on Programming Language, Design and Implementation (jun 1988), pp. 164- 174.]]
[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.]]

Cited By

View all
  • (2022)Inlining-Benefit Prediction with Interprocedural Partial Escape AnalysisProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567677(13-24)Online publication date: 29-Nov-2022
  • (2020)Design and Implementation of an Escape Analysis in the Context of Safety-Critical Embedded SystemsACM Transactions on Embedded Computing Systems10.1145/337213319:1(1-20)Online publication date: 6-Feb-2020
  • (2018)Restructuring AMS to reduce synchronization overheads on android systemCluster Computing10.1007/s10586-018-2540-1Online publication date: 26-Mar-2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

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: 01 October 1999
Published in SIGPLAN Volume 34, Issue 10

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)178
  • Downloads (Last 6 weeks)31
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Inlining-Benefit Prediction with Interprocedural Partial Escape AnalysisProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567677(13-24)Online publication date: 29-Nov-2022
  • (2020)Design and Implementation of an Escape Analysis in the Context of Safety-Critical Embedded SystemsACM Transactions on Embedded Computing Systems10.1145/337213319:1(1-20)Online publication date: 6-Feb-2020
  • (2018)Restructuring AMS to reduce synchronization overheads on android systemCluster Computing10.1007/s10586-018-2540-1Online publication date: 26-Mar-2018
  • (2017)Correctness of Partial Escape Analysis for Multithreading OptimizationProceedings of the 19th Workshop on Formal Techniques for Java-like Programs10.1145/3103111.3104039(1-6)Online publication date: 18-Jun-2017
  • (2017)Design and Implementation of Mobile Learning System for Soldiers’ Vocational Skill Identification Based on AndroidIOP Conference Series: Materials Science and Engineering10.1088/1757-899X/242/1/012119242(012119)Online publication date: 28-Sep-2017
  • (2012)Secure the ClonesLogical Methods in Computer Science10.2168/LMCS-8(2:5)20128:2Online publication date: 31-May-2012
  • (2012)Finding reusable data structuresACM SIGPLAN Notices10.1145/2398857.238469047:10(1017-1034)Online publication date: 19-Oct-2012
  • (2012)Lock removal for concurrent trace programsProceedings of the 24th international conference on Computer Aided Verification10.1007/978-3-642-31424-7_20(227-242)Online publication date: 7-Jul-2012
  • (2012)Class-Modular, class-escape and points-to analysis for object-oriented languagesProceedings of the 4th international conference on NASA Formal Methods10.1007/978-3-642-28891-3_11(106-119)Online publication date: 3-Apr-2012
  • (2011)Reuse, recycle to de-bloat softwareProceedings of the 25th European conference on Object-oriented programming10.5555/2032497.2032524(408-432)Online publication date: 25-Jul-2011
  • 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