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].
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 4.BLANCHET, B. Garbage Collection statique. DEA report, INRIA, Rocquencourt, Sept. 1996.]]Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 15.GAy, D., AND STEENSGAARD, B. Stack Allocating Objects in Java. http://research.microsoft, com/apl.]]Google Scholar
- 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 ScholarDigital Library
- 17.HARRISON, W. The interprocedural analysis and automatic paxallelisation of Scheme programs. Lisp and Symbolic Computation 2 (1989), 176 - 396.]]Google ScholarCross Ref
- 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 Scholar
- 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 ScholarDigital Library
- 20.HUGHES, S. Compile-Time Garbage Collection for Higher-Order Functional Languages. J. Logic Computat. 2, 4 (1992), 483 - 509.]]Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 23.LINDHOLM, T., AND YELLIN, F. The JavaTM Virtual Machine Specification. Addison-Wesley, 1996.]] Google ScholarDigital Library
- 24.McDOWELL, C. E. Reducing garbage in Java. A CM Sigptan Notices 33, 9 (Sept. 1998), 84-86.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 30.StaYERS, O. Control flow analysis in Scheme. In ACM SIGPLAN Conference on Programming Language, Design and Implementation (jun 1988), pp. 164- 174.]] Google ScholarDigital Library
- 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 Scholar
Index Terms
- Escape analysis for object-oriented languages: application to Java
Recommendations
Escape analysis for JavaTM: Theory and practice
Escape analysis is a static analysis that determines whether the lifetime of data may exceed its static scope.This paper first presents the design and correctness proof of an escape analysis for JavaTM. This analysis is interprocedural, context ...
Escape analysis for object-oriented languages: application to Java
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 ...
Class-Modular, class-escape and points-to analysis for object-oriented languages
NFM'12: Proceedings of the 4th international conference on NASA Formal MethodsWe present a combined class-modular points-to and class-escape analysis that allows to analyze class declarations even if no information about the code that invokes the class's methods is available as is the case for e.g. shared libraries. Any standard ...
Comments