[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1109/CGO.2007.34acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
Article

Run-Time Support for Optimizations Based on Escape Analysis

Published: 11 March 2007 Publication History

Abstract

The JavaTM programming language does not allow the programmer to influence memory management. An object is usually allocated on the heap and deallocated by the garbage collector when it is not referenced any longer. Under certain conditions, the virtual machine can allocate objects on the stack or eliminate their allocation via scalar replacement. However, even if the dynamic compiler guarantees that the conditions are fulfilled, the optimizations require support by the run-time environment. We implemented a new escape analysis algorithm for Sun Microsystems' Java HotSpotTM VM. The results are used to replace objects with scalar variables, to allocate objects on the stack, and to remove synchronization. This paper deals with the representation of optimized objects in the debugging information and with reallocation and garbage collection support for a safe execution of optimized methods. Assignments to fields of parameters that can refer to both stack and heap objects are associated with an extended write barrier which skips card marking for stack objects. The traversal of objects during garbage collection uses a wrapper that abstracts from stack objects and presents their pointer fields as root pointers to the garbage collector. When a previously compiled and currently executing method must be continued in the interpreter because dynamic class loading invalidates the machine code, execution is suspended and compiler optimizations are undone. Scalar-replaced objects are reallocated on the heap lazily when control returns to the invalidated method, whereas stack-allocated objects must be reallocated immediately before program execution resumes. After reallocation, objects for which synchronization was removed are relocked.

References

[1]
{1} O. Agesen and D. Detlefs. Mixed-mode bytecode execution. Technical Report TR-2000-87, Sun Microsystems Laboratories, June 2000.
[2]
{2} O. Agesen, D. Detlefs, A. Garthwaite, R. Knippel, Y. S. Ramakrishna, and D. White. An efficient meta-lock for implementing ubiquitous synchronization. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 207- 222, Denver, Nov. 1999.
[3]
{3} D. F. Bacon, R. Konuru, C. Murthy, and M. Serrano. Thin locks: Featherweight synchronization for Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 258- 268, Montreal, June 1998.
[4]
{4} B. Blanchet. Escape analysis for Java¿: Theory and practice. ACM Transactions on Programming Languages and Systems, 25(6):713-775, Nov. 2003.
[5]
{5} 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.
[6]
{6} J.-D. Choi, M. Gupta, M. J. Serrano, V. C. Sreedhar, and S. P. Midkiff. Stack allocation and synchronization optimizations for Java using escape analysis. ACM Transactions on Programming Languages and Systems, 25(6):876-910, Nov. 2003.
[7]
{7} J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In Proceedings of the European Conference on Object-Oriented Programming, pages 77-101, Århus, Aug. 1995.
[8]
{8} D. Detlefs and O. Agesen. Inlining of virtual methods. In Proceedings of the European Conference on Object-Oriented Programming, pages 258-278, Lisbon, June 1999.
[9]
{9} 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, Mar. 2000.
[10]
{10} U. Hölzle, C. Chambers, and D. Ungar. 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.
[11]
{11} A. L. Hosking and R. L. Hudson. Remembered sets can also play cards. In Proceedings of the ACM OOPSLA Workshop on Memory Management and Garbage Collection, Washington, D. C., Oct. 1993.
[12]
{12} Intel Corporation. IA-32 Intel Architecture Software Developer's Manual, Volume 2A & 2B: Instruction Set Reference, 2006. Order numbers 253666-018 and 253667-018.
[13]
{13} K. Ishizaki, M. Kawahito, T. Yasue, H. Komatsu, and T. Nakatani. A study of devirtualization techniques for a Java¿ just-in-time compiler. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 294- 310, Minneapolis, Oct. 2000.
[14]
{14} T. Kotzmann. Escape Analysis in the Context of Dynamic Compilation and Deoptimization. PhD thesis, Institute for System Software, Johannes Kepler University Linz, Oct. 2005.
[15]
{15} T. Kotzmann and H. Mössenböck. Escape analysis in the context of dynamic compilation and deoptimization. In Proceedings of the International Conference on Virtual Execution Environments, pages 111-120, Chicago, June 2005.
[16]
{16} E. Ruf. Effective synchronization removal for Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 208- 218, Vancouver, June 2000.
[17]
{17} K. Russell and D. Detlefs. Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 263-272, Portland, Oct. 2006.
[18]
{18} Standard Performance Evaluation Corporation. The SPEC JBB2005 Benchmark. http://www.spec.org/jbb2005/.
[19]
{19} Standard Performance Evaluation Corporation. The SPEC JVM98 Benchmarks. http://www.spec.org/jvm98/.
[20]
{20} T. Suganuma, T. Yasue, and T. Nakatani. A region-based compilation technique for a Java just-in-time compiler. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 312- 323, San Diego, June 2003.
[21]
{21} Sun Microsystems, Inc. Java Platform, Standard Edition 6 Source Snapshot Releases. http://download.java.net/jdk6/.
[22]
{22} R. Veldema, C. J. H. Jacobs, R. F. H. Hofman, and H. E. Bal. Object combining: A new aggressive optimization for object intensive programs. In Proceedings of the Joint ACM-ISCOPE Conference on Java Grande, pages 165-174, Seattle, Nov. 2002.
[23]
{23} J. Whaley and M. Rinard. Compositional pointer and escape analysis for Java programs. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 187-206, Denver, Nov. 1999.

Cited By

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

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
CGO '07: Proceedings of the International Symposium on Code Generation and Optimization
March 2007
346 pages
ISBN:0769527647

Sponsors

Publisher

IEEE Computer Society

United States

Publication History

Published: 11 March 2007

Check for updates

Qualifiers

  • Article

Conference

CGO07

Acceptance Rates

CGO '07 Paper Acceptance Rate 27 of 84 submissions, 32%;
Overall Acceptance Rate 312 of 1,061 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 19 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (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
  • (2023)Exploiting Partially Context-sensitive Profiles to Improve Performance of Hot CodeACM Transactions on Programming Languages and Systems10.1145/361293745:4(1-64)Online publication date: 13-Sep-2023
  • (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
  • (2017)Practical partial evaluation for high-performance dynamic language runtimesACM SIGPLAN Notices10.1145/3140587.306238152:6(662-676)Online publication date: 14-Jun-2017
  • (2017)Practical partial evaluation for high-performance dynamic language runtimesProceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3062341.3062381(662-676)Online publication date: 14-Jun-2017
  • (2017)One compiler: deoptimization to optimized codeProceedings of the 26th International Conference on Compiler Construction10.1145/3033019.3033025(55-64)Online publication date: 5-Feb-2017
  • (2015)Accurate profiling in the presence of dynamic compilationACM SIGPLAN Notices10.1145/2858965.281428150:10(433-450)Online publication date: 23-Oct-2015
  • (2015)Accurate profiling in the presence of dynamic compilationProceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2814270.2814281(433-450)Online publication date: 23-Oct-2015
  • Show More Cited By

View Options

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