Abstract
Escape analysis facilitates better optimization of programs in object-oriented programming languages such as Java, significantly reducing memory management and synchronization overhead. Unfortunately, existing escape analysis algorithms are often too expensive to be applicable in just-in-time compilation contexts. We propose to perform the analysis ahead of time and ship its results as code annotations. We present an interprocedural, flow insensitive, static escape analysis that is less precise than traditional escape analyses, but whose result can be transported and verified efficiently. Unlike any other escape analysis that we know of, our method optionally provides for dynamic class loading, which is necessary for full Java compatibility. Benchmarks indicate that, when compared to Whaley and Rinard’s elaborate escape analysis, our simple analysis can pinpoint 81% of all captured allocation sites (69% when dynamic loading is supported), with negligible space overhead for the transport of annotations and negligible time overhead for the verification.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Krintz, C., Calder, B.: Using annotations to reduce dynamic optimization time. In: Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, Snowbird, Utah, May 2001. SIGPLAN Notices, vol. 36(5), pp. 156–167 (2001)
Azevedo, A., Nicolau, A., Hummel, J.: Java annotation-aware just-in-time compilation system. In: ACM Java Grande Conference, pp. 142–151 (1999)
Jones, J., Kamin, S.: Annotating Java class files with virtual registers for performance. Concurrency: Practice and Experience 12, 389–406 (2000)
Pominville, P., Qian, F., Vallee-Rai, R., Hendren, L., Verbrugge, C.: A framework for optimizing Java using attributes. In: Sable Technical Report No. 2000-2 (2000)
Grant, B., Mock, M., Philipose, M., Chambers, C., Eggers, S.J.: DyC: an expressive annotation-directed dynamic compiler for C. Theoretical Computer Science 248, 147–199 (2000)
Reig, F.: Annotations for portable intermediate languages. In: Benton, N., Kennedy, A. (eds.) Electronic Notes in Theoretical Computer Science, vol. 59, Elsevier Science Publishers, Amsterdam (2001)
: Compositional pointer and escape analysis for Java programs. In: Proceedings of the 14th Annual ACM SIGPLAN Conference on Object- Oriented Programming Systems, Languages, and Applications, Denver, CO (1999)
Choi, J., Gupta, M., Serrano, M., Shreedhar, V., Midkiff, S.: Escape analysis for Java. In: ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA (1999)
Bogda, J., Hölzle, U.: Removing unnecessary synchronization in Java. In: ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA (1999)
Gay, D., Steensgaard, B.: Fast escape analysis and stack allocation for object-based programs. In: Compiler Construction 2000, Berlin, Germany (2000)
Hartmann, A., Amme, W., von Ronne, J., Franz, M.: Code annotation for safe and efficient dynamic object resolution. Electronic Notes in Theoretical Computer Science 82 (2003)
Lhoták, O., Hendren, L.: Run-time evaluation of opportunities for object inlining in Java. In: Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande (JGI-02), pp. 175–184. ACM Press, New York (2002)
Rehof, J., Mogensen, T.Æ.: Tractable constraints in finite semi-lattices. In: Cousot, R., Schmidt, D.A. (eds.) SAS 1996. LNCS, vol. 1145, pp. 285–301. Springer, Heidelberg (1996)
Java Grande Forum: The Java Grande Forum benchmark suite (2003)
Standard Performance Evaluation Corporation: SPEC JVM98 benchmarks (1998), See online at http://www.spec.org/osg/jvm98 for more information
Sălcianu, A.: Pointer analysis and it applications for Java programs. Master’s thesis, Massachusetts Institute of Technology, Cambridge, MA (2001)
Fitzgerald, R., Knoblock, T.B., Ruf, E., Steensgaard, B., Tarditi, D.: Marmot: an optimizing compiler for Java. Software—Practice and Experience 30, 199–232 (2000)
Hummel, S.F., Lieber, D., Ngo, T., Mergen, M., Shepherd, J.C., Smith, S.: Implementing Jalapeño in Java. In: Proceedings of the ACM SIGPLAN 1999 Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA (1999)
Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999)
Ruggieri, C., Murtagh, T.P.: Lifetime analysis of dynamically allocated objects. In: Conference Record of the Conference on Principles of Programming Languages, ACM SIGACT and SIGPLAN, pp. 285–293. ACM Press, New York (1988)
Park, Y.G., Goldberg, B.: Escape analysis on lists. In: Proceedings of the 5th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 116–127 (1992)
Deutsch, A.: On the complexity of escape analysis. In: Conference Record of POPL 1997: The 24TH ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, ACM SIGACT and SIGPLAN, pp. 358–371 (1997)
Blanchet, B.: Escape Analysis for Java(TM). Theory and Practice. ACM Transactions on Programming Languages and Systems 25, 713–775 (2003)
Necula, G.C.: Proof-carrying code. In: Proceedings of the ACM SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL), Paris, France, pp. 106–119 (1997)
Necula, G.C., Lee, P.: The design and implementation of a certifying compiler. In: Proceedings of the ACM SIGPLAN’98 Conference on Programming Language Design and Implementation (PLDI), Montreal, Canada, May 1998. SIGPLAN Notices, vol. 33(5), pp. 333–344 (1998)
Rinard, M.: Credible compilation. Technical Report MIT/LCS/TR-776, MIT (1999)
Rinard, M., Marinov, D.: Credible compilation with pointers. In: Proceedings of the FLoC Workshop on Run-Time Result Verification, Trento, Italy (1999)
Necula, G.C.: Translation validation for an optimizing compiler. ACM SIGPLAN Notices 35, 83–94 (2000)
Franz, M., Krintz, C., Haldar, V., Stork, C.H.: Tamper-proof annotations, by design. Technical report, Department of Information and Computer Science, University of California, Irvine (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Beers, M.Q., Stork, C.H., Franz, M. (2004). Efficiently Verifiable Escape Analysis. In: Odersky, M. (eds) ECOOP 2004 – Object-Oriented Programming. ECOOP 2004. Lecture Notes in Computer Science, vol 3086. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24851-4_4
Download citation
DOI: https://doi.org/10.1007/978-3-540-24851-4_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22159-3
Online ISBN: 978-3-540-24851-4
eBook Packages: Springer Book Archive