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

Escape analysis in the context of dynamic compilation and deoptimization

Published: 11 June 2005 Publication History

Abstract

In object-oriented programming languages, an object is said to escape the method or thread in which it was created if it can also be accessed by other methods or threads. Knowing which objects do not escape allows a compiler to perform aggressive optimizations.This paper presents a new intraprocedural and interprocedural algorithm for escape analysis in the context of dynamic compilation where the compiler has to cope with dynamic class loading and deoptimization. It was implemented for Sun Microsystems' Java HotSpot™ client compiler and operates on an intermediate representation in SSA form. We introduce equi-escape sets for the efficient propagation of escape information between related objects. The analysis is used for scalar replacement of fields and synchronization removal, as well as for stack allocation of objects and fixed-sized arrays. The results of the interprocedural analysis support the compiler in inlining decisions and allow actual parameters to be allocated on the caller stack.Under certain circumstances, the Java HotSpot™ VM is forced to stop executing a method's machine code and transfer control to the interpreter. This is called deoptimization. Since the interpreter does not know about the scalar replacement and synchronization removal performed by the compiler, the deoptimization framework was extended to reallocate and relock objects on demand.

References

[1]
B. Blanchet. Escape analysis for Java™: Theory and practice. ACM Transactions on Programming Languages and Systems, 25(6):713--775, Nov. 2003.]]
[2]
J. Bogda and U. Hölzle. Removing unnecessary synchronization in Java. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications, pages 35--46, Denver, Nov. 1999.]]
[3]
J. Bogda and A. Singh. Can a shape analysis work at run-time? In Proceedings of the Java Virtual Machine Research and Technology Symposium, Monterey, 2001.]]
[4]
J.-D. Choi et al. Stack allocation and synchronization optimizations for Java using escape analysis. ACM Transactions on Programming Languages and Systems, 25(6):876--910, Nov. 2003.]]
[5]
R. Cytron et al. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, Oct. 1991.]]
[6]
J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. Lecture Notes in Computer Science, 952:77--101, 1995.]]
[7]
D. Gay and B. Steensgaard. Fast escape analysis and stack allocation for object-based programs. In Proceedings of the International Conference on Compiler Construction, pages 82--93, Berlin, 2000.]]
[8]
J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java™ Language Specification. Addison-Wesley, second edition, June 2000.]]
[9]
R. Griesemer and S. Mitrovic. A compiler for the Java HotSpot™ Virtual Machine. In L. Böszörményi, J. Gutknecht, and G. Pomberger, editors, The School of Niklaus Wirth: The Art of Simplicity, pages 133--152. dpunkt.verlag, Heidelberg, 2000.]]
[10]
M. Hirzel, A. Diwan, and M. Hind. Pointer analysis in the presence of dynamic class loading. In Proceedings of the European Conference on Object-Oriented Programming, pages 96--122, Oslo, June 2004.]]
[11]
U. Hölzle et al. Debugging optimized code with dynamic deoptimization. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 32--43, San Francisco, June 1992.]]
[12]
A. L. Hosking and R. L. Hudson. Remembered sets can also play cards. In Proceedings of the ACM OOPSLA Workshop on Garbage Collection and Memory Management, Washington, D.C., Oct. 1993.]]
[13]
Intel Corporation. IA-32 Intel Architecture Software Developer's Manual, Volume 2A & 2B: Instruction Set Reference, 2004. Order Numbers 253666 and 253667.]]
[14]
A. C. King. Removing GC synchronisation extended version. Technical Report 11-03, Computing Laboratory, University of Kent, Apr. 2003.]]
[15]
J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 378--391, 2005.]]
[16]
H. Mössenböck. Adding static single assignment form and a graph coloring register allocator to the Java Hotspot™ client compiler. Technical Report 15, Johannes Kepler University Linz, Nov. 2000.]]
[17]
V. K. Nandivada and D. Detlefs. Compile-time concurrent marking write barrier removal. In Proceedings of the International Symposium on Code Generation and Optimization, San Jose, 2005.]]
[18]
R. Pozo and B. Miller. Java SciMark 2.0. http://math.nist.gov/scimark2/.]]
[19]
E. Ruf. Effective synchronization removal for Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 208--218, Vancouver, 2000.]]
[20]
R. Sedgewick. Algorithms, pages 441--449. Addison-Wesley, second edition, 1988.]]
[21]
Standard Performance Evaluation Corporation. The SPEC JVM98 Benchmarks. http://www.spec.org/jvm98/.]]
[22]
Sun Microsystems, Inc. The Java HotSpot Virtual Machine, v1.4.1, Sept. 2002. http://java.sun.com/products/hotspot/.]]
[23]
F. Vivien and M. Rinard. Incrementalized pointer and escape analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 35--46, Snowbird, June 2001.]]
[24]
C. Wimmer and H. Mössenböck. Optimized interval splitting in a linear scan register allocator. In Proceedings of the Conference on Virtual Execution Environments, June 2005.]]

Cited By

View all
  • (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
  • (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
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
VEE '05: Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments
June 2005
216 pages
ISBN:1595930477
DOI:10.1145/1064979
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: 11 June 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Java
  2. deoptimization
  3. escape analysis
  4. just-in-time compilation
  5. optimization
  6. scalar replacement
  7. stack allocation
  8. synchronization removal

Qualifiers

  • Article

Conference

VEE05

Acceptance Rates

Overall Acceptance Rate 80 of 235 submissions, 34%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)11
Reflects downloads up to 12 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (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
  • (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
  • (2022)Principles of Staged Static+Dynamic Partial AnalysisStatic Analysis10.1007/978-3-031-22308-2_4(44-73)Online publication date: 2-Dec-2022
  • (2020)How (not) to write Java pointer analyses after 2020Proceedings of the 2020 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3426428.3426923(134-145)Online publication date: 18-Nov-2020
  • (2020)Escape from escape analysis of GolangProceedings of the ACM/IEEE 42nd International Conference on Software Engineering: Software Engineering in Practice10.1145/3377813.3381368(142-151)Online publication date: 27-Jun-2020
  • (2020)Modular collaborative program analysis in OPALProceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3368089.3409765(184-196)Online publication date: 8-Nov-2020
  • (2019)PYEACM Transactions on Programming Languages and Systems10.1145/333779441:3(1-37)Online publication date: 2-Jul-2019
  • (2019)Compare less, defer more: scaling value-contexts based whole-program heap analysesProceedings of the 28th International Conference on Compiler Construction10.1145/3302516.3307359(135-146)Online publication date: 16-Feb-2019
  • (2018)Lattice based modularization of static analysesCompanion Proceedings for the ISSTA/ECOOP 2018 Workshops10.1145/3236454.3236509(113-118)Online publication date: 16-Jul-2018
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media