Can a Shape Analysis Work at Run-time?

A shape analysis is a whole-program analysis that can identify run-time objects that do not need to be placed in the global heap and do not require any locking. Previous research has shown that these two optimizations can speed up some applications significantly. Unfortunately, since a shape analysis--like any whole-program analysis--requires a priori knowledge of the complete call graph, it has not been implemented in a JVM, which essentially builds the call graph as a program executes. In this paper, we adapt an efficient shape analysis to be incremental so that it can analyze an executing program. We investigate trade-offs regarding three approaches to performing the analysis inside a JVM and report results on a number of applications. Our measurements suggest that such an analysis may be viable if it uses results of previous executions and if it delays the initial analysis until the end of the first execution.

[1]  Thomas W. Reps,et al.  Putting static analysis to work for verification: A case study , 2000, ISSTA '00.

[2]  Erik Ruf,et al.  Effective synchronization removal for Java , 2000, PLDI '00.

[3]  Samuel P. Midkiff,et al.  Quicksilver: a quasi-static compiler for Java , 2000, OOPSLA '00.

[4]  Richard J. Anderson,et al.  Wait-free parallel algorithms for the union-find problem , 1991, STOC '91.

[5]  James C. Corbett,et al.  Using shape analysis to reduce finite-state models of concurrent Java programs , 2000, TSEM.

[6]  Keith H. Randall,et al.  Field analysis: getting useful and low-cost interprocedural information , 2000, PLDI '00.

[7]  Jens Palsberg,et al.  Scalable propagation-based call graph construction algorithms , 2000, OOPSLA '00.

[8]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.

[9]  Emin Gün Sirer,et al.  Static Analyses for Eliminating Unnecessary Synchronization from Java Programs , 1999, SAS.

[10]  Sandhya Dwarkadas,et al.  Languages, Compilers, and Run-Time Systems for Scalable Computers , 2000, Lecture Notes in Computer Science.

[11]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[12]  Vitaly Feldman,et al.  Sealed calls in Java packages , 2000, OOPSLA '00.

[13]  Reinhard Wilhelm,et al.  Shape Analysis , 2000, CC.

[14]  Jong-Deok Choi,et al.  A framework for interprocedural optimization in the presence of dynamic class loading , 2000, PLDI '00.

[15]  Urs Hölzle,et al.  Removing unnecessary synchronization in Java , 1999, OOPSLA '99.

[16]  Jeff Bogda Detecting Read-Only Methods in Java , 2000, LCR.