Skip to main content

Pointer Analysis in the Presence of Dynamic Class Loading

  • Conference paper
ECOOP 2004 – Object-Oriented Programming (ECOOP 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3086))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Agrawal, G., Li, J., Su, Q.: Evaluating a demand driven technique for call graph construction. In: Internat. Conference on Compiler Construction, CC (2002)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, DIKU report 94/19 (1994)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. Bacon, D.F., Sweeney, P.F.: Fast static analysis of C++ virtual function calls. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (1996)

    Google Scholar 

  7. Bogda, J., Singh, A.: Can a shape analysis work at run-time? In: Java Virtual Machine Research and Technology Symp., JVM (2001)

    Google Scholar 

  8. Burke, M., Torczon, L.: Interprocedural optimization: Eliminating unnecessary recompilation. In: Trans. on Prog. Lang. and Systems, TOPLAS (1993)

    Google Scholar 

  9. Chatterjee, R., Ryder, B.G., Landi, W.A.: Relevant context inference. In: Principles of Prog. Lang, POPL (1999)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Static Analysis Symposium, SAS (2003)

    Google Scholar 

  13. Cierniak, M., Lueh, G.-Y., Stichnoth, J.M.: Practicing JUDO: Java under dynamic optimizations. In: Prog. Lang. Design and Impl., PLDI (2000)

    Google Scholar 

  14. Cooper, K.D., Kennedy, K., Torczon, L.: Interprocedural optimization: Eliminating unnecessary recompilation. In: Trans. on Prog. Lang. and Systems, TOPLAS (1986)

    Google Scholar 

  15. Das, M.: Unification-based pointer analysis with directional assignments. In: Prog. Lang. Design and Impl., PLDI (2000)

    Google Scholar 

  16. 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)

    Google Scholar 

  17. Detlefs, D., Agesen, O.: Inlining of virtual methods. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, p. 258. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Fernandez, M.F.: Simple and effective link-time optimization of Modula-3 programs. In: Prog. Lang. Design and Impl., PLDI (1995)

    Google Scholar 

  21. Fink, S.J., Qian, F.: Design, implementation, and evaluation of adaptive recompilation with on-stack replacement. In: Code Gen. and Optimization, CGO (2003)

    Google Scholar 

  22. 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)

    Google Scholar 

  23. Grove, D.P.: Effective Interprocedural Optimization of Object-Oriented Languages. PhD thesis, University of Washington (1998)

    Google Scholar 

  24. 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)

    Google Scholar 

  25. Harris, T.: Early storage reclamation in a tracing garbage collector. ACM SIGPLAN Notices (1999)

    Google Scholar 

  26. Heintze, N.: Analysis of large code bases: The compile-link-analyze model (1999), http://cm.bell-labs.com/cm/cs/who/nch/cla.ps

  27. Heintze, N., Tardieu, O.: Demand-driven pointer analysis. In: Prog. Lang. Design and Impl., PLDI (2001)

    Google Scholar 

  28. 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)

    Google Scholar 

  29. Hendren, L.: Parallelizing Programs with Recursive Data Structures. PhD thesis, Cornell University (1990)

    Google Scholar 

  30. Hind, M.: Pointer analysis: Haven’t we solved this problem yet? In: Workshop on Program Analysis for Software Tools and Engineering, PASTE (2001)

    Google Scholar 

  31. Hind, M., Pioli, A.: Which pointer analysis should I use? In: Internat. Symp. on Software Testing and Analysis, ISSTA (2000)

    Google Scholar 

  32. Hirzel, M., Diwan, A., Hertz, M.: Connectivity-based garbage collection. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2003)

    Google Scholar 

  33. Hirzel, M., Henkel, J., Diwan, A., Hind, M.: Understanding the connectivity of heap objects. In: Internat. Symp. on Memory Management, ISMM (2002)

    Google Scholar 

  34. Hölzle, U., Chambers, C., Ungar, D.: Debugging optimized code with dynamic deoptimization. In: Prog. Lang. Design and Impl., PLDI (1992)

    Google Scholar 

  35. Hölzle, U., Ungar, D.: Optimizing dynamically-dispatched calls with run-time type feedback. In: Prog. Lang. Design and Impl., PLDI (1994)

    Google Scholar 

  36. 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

  37. Larus, J.R., Chandra, S.: Using tracing and dynamic slicing to tune compilers. University of Wisconsin Technical Report 1174 (August 1993)

    Google Scholar 

  38. 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)

    Google Scholar 

  39. Lhoták, O., Hendren, L.: Scaling Java points-to analysis using SPARK. In: Internat. Conference on Compiler Construction, CC (2003)

    Google Scholar 

  40. 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)

    Google Scholar 

  41. 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)

    Google Scholar 

  42. Lindholm, T., Yellin, F.: The Java virtual machine specification., 2nd edn. Addison-Wesley, Reading (1999)

    Google Scholar 

  43. Paleczny, M., Vick, C., Click, C.: The Java HotSpot server compiler. In: Java Virtual Machine Research and Technology Symp., JVM (2001)

    Google Scholar 

  44. Pechtchanski, I., Sarkar, V.: Dynamic optimistic interprocedural analysis: a framework and an application. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2001)

    Google Scholar 

  45. Qian, F., Hendren, L.: Towards dynamic interprocedural analysis in JVMs. In: Java Virtual Machine Research and Technology Symp., JVM (2004)

    Google Scholar 

  46. Rountev, A., Chandra, S.: Off-line variable substitution for scaling points-to analysis. In: Prog. Lang. Design and Impl, PLDI (2000)

    Google Scholar 

  47. 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)

    Google Scholar 

  48. Ruf, E.: Effective synchronization removal for Java. In: Prog. Lang. Design and Impl., PLDI (2000)

    Google Scholar 

  49. Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. In: Principles of Prog. Lang., POPL (1999)

    Google Scholar 

  50. Shapiro, M., Horwitz, S.: The effects of the precision of pointer analysis. In: Static Analysis Symp., SAS (1997)

    Google Scholar 

  51. 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)

    Google Scholar 

  52. Steensgaard, B.: Points-to analysis in almost linear time. In: Principles of Prog. Lang., POPL (1996)

    Google Scholar 

  53. 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)

    Google Scholar 

  54. 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)

    Google Scholar 

  55. The Apache Tomcat Project. Apache Tomcat, http://jakarta.apache.org/tomcat

  56. The Eclipse Project. Eclipse, http://www.eclipse.org

  57. Tip, F., Palsberg, J.: Scalable propagation-based call graph construction algorithms. In: Obj.-Oriented Prog., Systems, Lang., and Applic., OOPSLA (2000)

    Google Scholar 

  58. 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)

    Google Scholar 

  59. Vivien, F., Rinard, M.: Incrementalized pointer and escape analysis. In: Prog. Lang. Design and Impl., PLDI (2001)

    Google Scholar 

  60. Whaley, J., Lam, M.: An efficient inclusion-based points-to analysis for strictlytyped languages. In: Static Analysis Symp., SAS (2002)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics