Pointer and escape analysis for multithreaded programs

This paper presents a new combined pointer and escape analysis for multithreaded programs. The algorithm uses a new abstraction called parallel interaction graphs to analyze the interactions between threads and extract precise points-to, escape, and action ordering information for objects accessed by multiple threads. The analysis is compositional, analyzing each method or thread once to extract a parameterized analysis result that can be specialized for use in any context. It is also capable of analyzing programs that use the unstructured form of multithreading present in languages such as Java and standard threads packages such as POSIX threads. We have implemented the analysis in the MIT Flex compiler for Java and used the extracted information to 1) verify that programs correctly use region-based allocation constructs, 2) eliminate dynamic checks associated with the use of regions, and 3) eliminate unnecessary synchronization. Our experimental results show that analyzing the interactions between threads significantly increases the effectiveness of the region analysis and region check elimination, but has little effect for synchronization elimination.

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

[2]  Vivek S. Pai,et al.  Flash : An e cient and portable Web server , 1999 .

[3]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[4]  Marvin Theimer,et al.  Using threads in interactive systems: a case study , 1993, SOSP '93.

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

[6]  David A. Padua,et al.  Issues in the Optimization of Parallel Programs , 1990, ICPP.

[7]  John H. Reppy,et al.  Higher-Order Concurrency , 1992 .

[8]  David Gay,et al.  Language support for regions , 2001, PLDI '01.

[9]  Bruno Blanchet,et al.  Escape analysis for object-oriented languages: application to Java , 1999, OOPSLA '99.

[10]  Dirk Grunwald,et al.  Data flow equations for explicitly parallel programs , 1993, PPOPP '93.

[11]  Anoop Gupta,et al.  Data locality and load balancing in COOL , 1993, PPOPP '93.

[12]  James Gosling,et al.  The Real-Time Specification for Java , 2000, Computer.

[13]  Jens Palsberg,et al.  Type inference of SELF: Analysis of objects with dynamic and multiple inheritance , 1995, Softw. Pract. Exp..

[14]  Andy J. Wellings,et al.  A Comparison of the Asynchronous Transfer of Control Features in Ada and the Real-Time Speci.cation for Java , 2003, Ada-Europe.

[15]  Doug Lea,et al.  Concurrent programming in Java - design principles and patterns , 1996, Java series.

[16]  David Grove,et al.  Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis , 1995, ECOOP.

[17]  Anoop Gupta,et al.  The SPLASH-2 programs: characterization and methodological considerations , 1995, ISCA.

[18]  Alexandru D. Sălcianu Pointer analysis and its applications for Java programs , 2001 .

[19]  Martin C. Rinard,et al.  Analysis of Multithreaded Programs , 2001, SAS.

[20]  Bernhard Steffen,et al.  Parallelism for Free : E cient and Optimal Bitvector Analyses for Parallel Programs , 1996 .

[21]  David Walker,et al.  Typed memory management in a calculus of capabilities , 1999, POPL '99.

[22]  Greg Nelson,et al.  Systems programming in modula-3 , 1991 .

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

[24]  Andrew D. Birrell,et al.  An Introduction to Programming with Threads , 1996 .

[25]  Lars Birkedal,et al.  A region inference algorithm , 1998, TOPL.

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

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

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

[29]  Willy Zwaenepoel,et al.  Flash: An efficient and portable Web server , 1999, USENIX Annual Technical Conference, General Track.

[30]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

[31]  Martin C. Rinard,et al.  Pointer analysis for multithreaded programs , 1999, PLDI '99.

[32]  James C. Corbett,et al.  Constructing compact models of concurrent Java programs , 1998, ISSTA '98.