Write barrier removal by static analysis

被引:5
|
作者
Zee, K [1 ]
Rinard, M [1 ]
机构
[1] MIT, Comp Sci Lab, Cambridge, MA 02139 USA
基金
美国国家科学基金会;
关键词
algorithms; performance; experimentation; program analysis; pointer analysis; generational garbage collection; write barriers;
D O I
10.1145/583854.582439
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a new analysis for removing unnecessary write barriers in programs that use generational garbage collection. To our knowledge, this is the first static program analysis for this purpose. Our algorithm uses a pointer analysis to locate assignments that always create a reference from a younger object to an older object, then transforms the program to remove the write barriers normally associated with such assignments. We have implemented two transformations that reorder object allocations; these transformations can significantly increase the effectiveness of our write barrier removal algorithm. Our base technique assumes that the collector promotes objects in age order. We have developed an extension that enables the optimistic removal of write barriers, with the collector lazily adding each newly promoted object into a remembered set of objects whenever the compiler may have removed write barriers involving the object at statements that have yet to execute. This mechanism enables the application of our technique to virtually any memory management system that uses write barriers to enable generational garbage collection. Results from our implemented system show that our technique can remove substantial numbers of write barriers from the majority of the programs in our benchmark set, producing modest performance improvements of up to 6% of the overall execution time. Moreover, by dynamically instrumenting the executable, we are able to show that for six of our nine benchmark programs, our analysis is close to optimal in the sense that it removes the write barriers for almost all assignments that do not, in the observed execution, create a reference from an older object to a younger object. Finally, our results show that the overhead of our optimistic extension is negligible.
引用
收藏
页码:191 / 210
页数:20
相关论文
共 50 条
  • [1] Write barrier removal by static analysis
    Zee, K
    Rinard, M
    ACM SIGPLAN NOTICES, 2002, 37 (04) : 32 - 41
  • [2] Gradual Write-Barrier Insertion into a Ruby Interpreter
    Sasada, Koichi
    PROCEEDINGS OF THE 2019 ACM SIGPLAN INTERNATIONAL SYMPOSIUM ON MEMORY MANAGEMENT (ISMM '19), 2019, : 115 - 121
  • [3] Lightweight Generics in Embedded Systems through Static Analysis
    Sallenave, Olivier
    Ducournau, Roland
    ACM SIGPLAN NOTICES, 2012, 47 (05) : 11 - 20
  • [4] Finding your cronies: Static analysis for dynamic object colocation
    Guyer, SZ
    McKinley, KS
    ACM SIGPLAN NOTICES, 2004, 39 (10) : 237 - 250
  • [5] Design and Analysis of Field-Logging Write Barriers
    Blackburn, Stephen M.
    PROCEEDINGS OF THE 2019 ACM SIGPLAN INTERNATIONAL SYMPOSIUM ON MEMORY MANAGEMENT (ISMM '19), 2019, : 103 - 114
  • [6] Heap Abstractions for Static Analysis
    Kanvar, Vini
    Khedker, Uday P.
    ACM COMPUTING SURVEYS, 2016, 49 (02)
  • [7] Determinacy in Static Analysis for jQuery
    Andreasen, Esben
    Moller, Anders
    ACM SIGPLAN NOTICES, 2014, 49 (10) : 17 - 31
  • [8] On the complexity analysis of static analyses
    Mcallester, D
    JOURNAL OF THE ACM, 2002, 49 (04) : 512 - 537
  • [9] Static Analysis and Compiler Design for Idempotent Processing
    de Kruijf, Marc
    Sankaralingam, Karthikeyan
    Jha, Somesh
    ACM SIGPLAN NOTICES, 2012, 47 (06) : 475 - 486
  • [10] Reconciling Elastic and Equilibrium Methods for Static Analysis
    Shin, Hijung V.
    Porst, Christopher F.
    Vouga, Etienne
    Ochsendorf, John
    Durand, Fredo
    ACM TRANSACTIONS ON GRAPHICS, 2016, 35 (02):