Abstract
Many optimizations need precise pointer analyses to be effective. Unfortunately, some Java features, such as dynamic class loading, reflection, and native methods, make pointer analyses difficult to develop. Hence, prior pointer analyses for Java either ignore these features or are overly conservative. This paper presents the first non-trivial pointer analysis that deals with all Java language features. This paper identifies all problems in performing Andersen’s pointer analysis for the full Java language, presents solutions to those problems, and uses a full implementation of the solutions in Jikes RVM for validation and performance evaluation. The results from this work should be transferable to other analyses and to other languages.
This work is supported by NSF ITR grant CCR-0085792, an NSF Career Award CCR-0133457, an IBM Ph.D. Fellowship, an IBM faculty partnership award, and an equipment grant from Intel. Any opinions, findings and conclusions or recommendations expressed in this material are the authors’ and do not necessarily reflect those of the sponsors.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Agrawal, G., Li, J., Su, Q.: Evaluating a demand driven technique for call graph construction. In: Internat. Conference on Compiler Construction, CC (2002)
Alpern, B., Attanasio, C.R., Barton, J.J., Burke, M.G., Cheng, P., Choi, J.-D., Cocchi, A., Fink, S.J., Grove, D., Hind, M., Hummel, S.F., Lieber, D., Litvinov, V., Mergen, M.F., Ngo, T., Russell, J.R., Sarkar, V., Serrano, M.J., Shepherd, J.C., Smith, S.E., Sreedhar, V.C., Srinivasan, H., Whaley, J.: The Jalapeño virtual machine. IBM Systems Journal 39(1) (2000)
Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, DIKU report 94/19 (1994)
Arnold, M., Fink, S., Grove, D., Hind, M., Sweeney, P.F.: Adaptive optimization in the Jalapeño JVM. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2000)
Arnold, M., Ryder, B.G.: Thin guards: A simple and effective technique for reducing the penalty of dynamic class loading. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, p. 498. Springer, Heidelberg (2002)
Bacon, D.F., Sweeney, P.F.: Fast static analysis of C++ virtual function calls. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (1996)
Bogda, J., Singh, A.: Can a shape analysis work at run-time? In: Java Virtual Machine Research and Technology Symp., JVM (2001)
Burke, M., Torczon, L.: Interprocedural optimization: Eliminating unnecessary recompilation. In: Trans. on Prog. Lang. and Systems, TOPLAS (1993)
Chatterjee, R., Ryder, B.G., Landi, W.A.: Relevant context inference. In: Principles of Prog. Lang, POPL (1999)
Cheng, B.-C., Hwu, W.-m.W.: Modular interprocedural pointer analysis using access paths: design, implementation, and evaluation. In: Prog. Lang. Design and Impl., PLDI (2000)
Choi, J.-D., Gupta, M., Serrano, M., Sreedhar, V.C., Midkiff, S.: Escape analysis for Java. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (1999)
Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Static Analysis Symposium, SAS (2003)
Cierniak, M., Lueh, G.-Y., Stichnoth, J.M.: Practicing JUDO: Java under dynamic optimizations. In: Prog. Lang. Design and Impl., PLDI (2000)
Cooper, K.D., Kennedy, K., Torczon, L.: Interprocedural optimization: Eliminating unnecessary recompilation. In: Trans. on Prog. Lang. and Systems, TOPLAS (1986)
Das, M.: Unification-based pointer analysis with directional assignments. In: Prog. Lang. Design and Impl., PLDI (2000)
Dean, J., Grove, D., Chambers, C.: Optimization of object-oriented programs using static class hierarchy analysis. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 77–101. Springer, Heidelberg (1995)
Detlefs, D., Agesen, O.: Inlining of virtual methods. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, p. 258. Springer, Heidelberg (1999)
Diwan, A., McKinley, K.S., Moss, J.E.B.: Using types to analyze and optimize object-oriented programs. In: Trans. on Prog. Lang. and Systems, TOPLAS (2001)
Fähndrich, M., Foster, J.S., Su, Z., Aiken, A.: Partial online cycle elimination in inclusion constraint graphs. In: Prog. Lang. Design and Impl., PLDI (1998)
Fernandez, M.F.: Simple and effective link-time optimization of Modula-3 programs. In: Prog. Lang. Design and Impl., PLDI (1995)
Fink, S.J., Qian, F.: Design, implementation, and evaluation of adaptive recompilation with on-stack replacement. In: Code Gen. and Optimization, CGO (2003)
Foster, J.S., Fähndrich, M., Aiken, A.: Flow-insensitive points-to analysis with term and set constraints. Technical report, University of California at Berkeley (1997)
Grove, D.P.: Effective Interprocedural Optimization of Object-Oriented Languages. PhD thesis, University of Washington (1998)
Hall, M.W., Mellor-Crummey, J.M., Carle, A., Rodriguez, R.G.: Fiat: A framework for interprocedural analysis and transformations. In: Workshop on Languages and Compilers for Parallel Computing, LCPC (1993)
Harris, T.: Early storage reclamation in a tracing garbage collector. ACM SIGPLAN Notices (1999)
Heintze, N.: Analysis of large code bases: The compile-link-analyze model (1999), http://cm.bell-labs.com/cm/cs/who/nch/cla.ps
Heintze, N., Tardieu, O.: Demand-driven pointer analysis. In: Prog. Lang. Design and Impl., PLDI (2001)
Heintze, N., Tardieu, O.: Ultra-fast aliasing analysis using CLA: A million lines of C code in a second. In: Prog. Lang. Design and Impl., PLDI (2001)
Hendren, L.: Parallelizing Programs with Recursive Data Structures. PhD thesis, Cornell University (1990)
Hind, M.: Pointer analysis: Haven’t we solved this problem yet? In: Workshop on Program Analysis for Software Tools and Engineering, PASTE (2001)
Hind, M., Pioli, A.: Which pointer analysis should I use? In: Internat. Symp. on Software Testing and Analysis, ISSTA (2000)
Hirzel, M., Diwan, A., Hertz, M.: Connectivity-based garbage collection. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2003)
Hirzel, M., Henkel, J., Diwan, A., Hind, M.: Understanding the connectivity of heap objects. In: Internat. Symp. on Memory Management, ISMM (2002)
Hölzle, U., Chambers, C., Ungar, D.: Debugging optimized code with dynamic deoptimization. In: Prog. Lang. Design and Impl., PLDI (1992)
Hölzle, U., Ungar, D.: Optimizing dynamically-dispatched calls with run-time type feedback. In: Prog. Lang. Design and Impl., PLDI (1994)
King, A.C.: Removing GC synchronization (extended version). Winner (Graduate Division) ACM Student Research Competition (2003), http://www.acm.org/src/subpages/AndyKing/overview.html
Larus, J.R., Chandra, S.: Using tracing and dynamic slicing to tune compilers. University of Wisconsin Technical Report 1174 (August 1993)
Lattner, C., Adve, V.: Data Structure Analysis: An Efficient Context-Sensitive Heap Analysis. Tech. Report UIUCDCS-R-2003-2340, Computer Science Dept., Univ. of Illinois at Urbana-Champaign (April 2003)
Lhoták, O., Hendren, L.: Scaling Java points-to analysis using SPARK. In: Internat. Conference on Compiler Construction, CC (2003)
Liang, D., Pennings, M., Harrold, M.J.: Extending and evaluating flowinsenstitive and context-insensitive points-to analyses for Java. In: Workshop on Program Analysis for Software Tools and Engineering, PASTE (2001)
Liang, D., Pennings, M., Harrold, M.J.: Evaluating the precision of static reference analysis using profiling. In: Internat. Symp. on Software Testing and Analysis, ISSTA (2002)
Lindholm, T., Yellin, F.: The Java virtual machine specification., 2nd edn. Addison-Wesley, Reading (1999)
Paleczny, M., Vick, C., Click, C.: The Java HotSpot server compiler. In: Java Virtual Machine Research and Technology Symp., JVM (2001)
Pechtchanski, I., Sarkar, V.: Dynamic optimistic interprocedural analysis: a framework and an application. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2001)
Qian, F., Hendren, L.: Towards dynamic interprocedural analysis in JVMs. In: Java Virtual Machine Research and Technology Symp., JVM (2004)
Rountev, A., Chandra, S.: Off-line variable substitution for scaling points-to analysis. In: Prog. Lang. Design and Impl, PLDI (2000)
Rountev, A., Milanova, A., Ryder, B.G.: Points-to analysis for Java using annotated constraints. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2001)
Ruf, E.: Effective synchronization removal for Java. In: Prog. Lang. Design and Impl., PLDI (2000)
Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. In: Principles of Prog. Lang., POPL (1999)
Shapiro, M., Horwitz, S.: The effects of the precision of pointer analysis. In: Static Analysis Symp., SAS (1997)
Sreedhar, V.C., Burke, M., Choi, J.-D.: A framework for interprocedural analysis and optimization in the presence of dynamic class loading. In: Prog. Lang. Design and Impl., PLDI (2000)
Steensgaard, B.: Points-to analysis in almost linear time. In: Principles of Prog. Lang., POPL (1996)
Sundaresan, V., Hendren, L.J., Razafimahefa, C., Raja, V.-R., Lam, P., Gagnon, E., Godin, C.: Practical virtual method call resolution for Java. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2000)
Suganuma, T., Yasue, T., Kawahito, M., Komatsu, H., Nakatani, T.: A dynamic optimization framework for a Java just-in-time compiler. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2001)
The Apache Tomcat Project. Apache Tomcat, http://jakarta.apache.org/tomcat
The Eclipse Project. Eclipse, http://www.eclipse.org
Tip, F., Palsberg, J.: Scalable propagation-based call graph construction algorithms. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2000)
Vallée-Rai, R., Gagnon, E., Hendren, L., Lam, P., Pominville, P., Sundaresan, V.: Optimizing Java bytecode using the Soot framework: Is it feasible? In: European Conference for Object-Oriented Prog., ECOOP (2000)
Vivien, F., Rinard, M.: Incrementalized pointer and escape analysis. In: Prog. Lang. Design and Impl., PLDI (2001)
Whaley, J., Lam, M.: An efficient inclusion-based points-to analysis for strictlytyped languages. In: Static Analysis Symp., SAS (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
Hirzel, M., Diwan, A., Hind, M. (2004). Pointer Analysis in the Presence of Dynamic Class Loading . 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_5
Download citation
DOI: https://doi.org/10.1007/978-3-540-24851-4_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22159-3
Online ISBN: 978-3-540-24851-4
eBook Packages: Springer Book Archive