Stack allocation and synchronization optimizations for Java']Java using escape analysis

被引:43
|
作者
Choi, JD
Gupta, M
Serrano, MJ
Sreedhar, VC
Midkiff, SP
机构
[1] IBM Corp, Thomas J Watson Res Ctr, Yorktown Hts, NY 10598 USA
[2] Purdue Univ, Sch Elect & Comp Engn, W Lafayette, IN 47907 USA
关键词
algorithms; languages; connection graphs; escape analysis; points-to graph;
D O I
10.1145/945885.945892
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:876 / 910
页数:35
相关论文
共 50 条
  • [1] Escape analysis for Java']Java
    Choi, JD
    Gupta, M
    Serrano, M
    Sreedhar, VC
    Midkiff, S
    [J]. ACM SIGPLAN NOTICES, 1999, 34 (10) : 1 - 19
  • [2] Analysis and Optimizations of Java']Java Full Garbage Collection
    Li, Haoyu
    Wu, Mingyu
    Chen, Haibo
    [J]. 9TH ASIA-PACIFIC SYSTEMS WORKSHOP 2018 (APSYS'18), 2018,
  • [3] Java']Java bytecode optimizations
    Lambright, HD
    [J]. IEEE COMPCON 97, PROCEEDINGS, 1997, : 206 - 210
  • [4] Escape analysis for Java']Java™:: Theory and practice
    Blanchet, B
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2003, 25 (06): : 713 - 775
  • [5] Static check analysis for Java']Java stack inspection
    Chang, Byeong-Mo
    [J]. ACM SIGPLAN NOTICES, 2006, 41 (03) : 40 - 48
  • [6] Compositional pointer and escape analysis for Java']Java programs
    Whaley, J
    Rinard, M
    [J]. ACM SIGPLAN NOTICES, 1999, 34 (10) : 187 - 206
  • [7] Escape from Java']Java
    Eggan, Fred
    [J]. AMERICAN JOURNAL OF SOCIOLOGY, 1945, 50 (05) : 416 - 416
  • [8] ESCAPE FROM JAVA']JAVA
    不详
    [J]. SOCIOLOGY AND SOCIAL RESEARCH, 1944, 28 (04): : 324 - 324
  • [9] Data size optimizations for Java']Java programs
    Ananian, CS
    Rinard, M
    [J]. ACM SIGPLAN NOTICES, 2003, 38 (07) : 59 - 68
  • [10] Field escape analysis for data confidentiality in Java']Java components
    Shi, Aiwu
    Naumovich, Gleb
    [J]. 14TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2007, : 143 - +