|
ABSTRACT
This article presents an escape analysis framework for Java to determine (1) if an object is not reachable after its method of creation returns, allowing the object to be allocated on the stack, and (2) if an object is reachable only from a single thread during its lifetime, allowing unnecessary synchronization operations on that object to be removed. We introduce a new program abstraction for escape analysis, the connection graph, that is used to establish reachability relationships between objects and object references. We show that the connection graph can be succinctly summarized for each method such that the same summary information may be used in different calling contexts without introducing imprecision into the analysis. We present an interprocedural algorithm that uses the above property to efficiently compute the connection graph and identify the nonescaping objects for methods and threads. The experimental results, from a prototype implementation of our framework in the IBM High Performance Compiler for Java, are very promising. The percentage of objects that may be allocated on the stack exceeds 70% of all dynamically created objects in the user code in three out of the ten benchmarks (with a median of 19%); 11% to 92% of all mutex lock operations are eliminated in those 10 programs (with a median of 51%), and the overall execution time reduction ranges from 2% to 23% (with a median of 7%) on a 333-MHz PowerPC workstation with 512 MB memory.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
 |
2
|
David F. Bacon , Ravi Konuru , Chet Murthy , Mauricio Serrano, Thin locks: featherweight synchronization for Java, Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, p.258-268, June 17-19, 1998, Montreal, Quebec, Canada
|
 |
3
|
Lars Birkedal , Mads Tofte , Magnus Vejlstrup, From region inference to von Neumann machines via region representation inference, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.171-183, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237771]
|
 |
4
|
|
 |
5
|
Bruno Blanchet, Escape analysis for object-oriented languages: application to Java, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.20-34, November 01-05, 1999, Denver, Colorado, United States
|
 |
6
|
Jeff Bogda , Urs Hölzle, Removing unnecessary synchronization in Java, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.35-46, November 01-05, 1999, Denver, Colorado, United States
|
| |
7
|
|
| |
8
|
|
 |
9
|
|
 |
10
|
Ramkrishna Chatterjee , Barbara G. Ryder , William A. Landi, Relevant context inference, Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.133-146, January 20-22, 1999, San Antonio, Texas, United States
[doi> 10.1145/292540.292554]
|
 |
11
|
Ben-Chung Cheng , Wen-Mei W. Hwu, Modular interprocedural pointer analysis using access paths: design, implementation, and evaluation, Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, p.57-69, June 18-21, 2000, Vancouver, British Columbia, Canada
|
 |
12
|
|
 |
13
|
Jong-Deok Choi , Manish Gupta , Mauricio Serrano , Vugranam C. Sreedhar , Sam Midkiff, Escape analysis for Java, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.1-19, November 01-05, 1999, Denver, Colorado, United States
|
| |
14
|
Choi, J.-D., Gupta, M., Serrano, M. J., Sreedhar, V. C., and Midkiff, S. 2002. Stack allocation and synchronization optimizations for Java using escape analysis. Res. rep. RC22340. IBM T. J. Watson Research Center, Yorktown Heights, NY.
|
 |
15
|
|
 |
16
|
|
 |
17
|
|
 |
18
|
Maryam Emami , Rakesh Ghiya , Laurie J. Hendren, Context-sensitive interprocedural points-to analysis in the presence of function pointers, Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, p.242-256, June 20-24, 1994, Orlando, Florida, United States
|
 |
19
|
Manuel Fähndrich , Jakob Rehof , Manuvir Das, Scalable context-sensitive flow analysis using instantiation constraints, Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, p.253-263, June 18-21, 2000, Vancouver, British Columbia, Canada
|
 |
20
|
|
| |
21
|
|
| |
22
|
|
 |
23
|
|
| |
24
|
|
| |
25
|
|
| |
26
|
|
| |
27
|
|
| |
28
|
IBM Corporation 1997. IBM High Performance Compiler for Java. Available online for download at http://www.alphaWorks.ibm.com/formula.
|
| |
29
|
JavaMemoryModel 2002. Java memory model mailing list. Archived at http://www.cs.umd.edu/pugh/java/memoryModel/archive/.
|
 |
30
|
|
 |
31
|
|
 |
32
|
Jaejin Lee , David A. Padua , Samuel P. Midkiff, Basic compiler algorithms for parallel programs, Proceedings of the seventh ACM SIGPLAN symposium on Principles and practice of parallel programming, p.1-12, May 04-06, 1999, Atlanta, Georgia, United States
|
| |
33
|
Li, Z. and Abu-Sufah, W. 1987. On reducing data synchronization in multiprocessed loops. IEEE Trans. Comput. C-36, 1 (Jan.), 105--109.
|
 |
34
|
|
 |
35
|
|
| |
36
|
|
| |
37
|
|
| |
38
|
Oliver, M., Deciulescu, E., and Clark, C. 2000. Java positioning paper. Available online at http://www-1.ibm.com/servers/eserver/zseries/software/java/position.html.
|
 |
39
|
|
 |
40
|
|
| |
41
|
Reid, A., McCorquodale, J., Baker, J., Hsieh, W., and Zachary, J. 1999. The need for predictable garbage collection. In Proceedings of the WCSSS'99 Workshop on Compiler Support for System Software.
|
 |
42
|
|
 |
43
|
|
 |
44
|
|
 |
45
|
|
 |
46
|
|
 |
47
|
|
 |
48
|
John Whaley , Martin Rinard, Compositional pointer and escape analysis for Java programs, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.187-206, November 01-05, 1999, Denver, Colorado, United States
|
 |
49
|
|
CITED BY 16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thomas Kotzmann , Christian Wimmer , Hanspeter Mössenböck , Thomas Rodriguez , Kenneth Russell , David Cox, Design of the Java HotSpot™ client compiler for Java 6, ACM Transactions on Architecture and Code Optimization (TACO), v.5 n.1, p.1-32, May 2008
|
|
|
|
|
|
|
|
|
|
|
|
|
REVIEW
"Hans J. Schneider : Reviewer"
The authors of this paper tackle two questions related to optimizing Java programs. First, they identify objects that are local to a method and can be allocated on the stack, reducing the time needed for garbage collection. Then, they identify obj
more...
|