PYE: A Framework for Precise-Yet-Efficient Just-In-Time Analyses for Java']Java Programs

被引:10
作者
Thakur, Manas [1 ]
Nandivada, V. Krishna [1 ]
机构
[1] IIT Madras, Dept CSE, Chennai, Tamil Nadu, India
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2019年 / 41卷 / 03期
关键词
!text type='Java']Java[!/text] program analysis; precise and efficient program analysis; POINTS-TO ANALYSIS;
D O I
10.1145/3337794
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Languages like Java and C# follow a two-step process of compilation: static compilation and just-in-time (JIT) compilation. As the time spent in JIT compilation gets added to the execution-time of the application, JIT compilers typically sacrifice the precision of program analyses for efficiency. The alternative of performing the analysis for the whole program statically ignores the analysis of libraries (available only at runtime), and thereby generates imprecise results. To address these issues, in this article, we propose a two-step (static+JIT) analysis framework called precise-yet-efficient (PYE) that helps generate precise analysis-results at runtime at a very low cost. PYE achieves the twin objectives of precision and performance during JIT compilation by using a two-pronged approach: (i) It performs expensive analyses during static compilation, while accounting for the unavailability of the runtime libraries by generating partial results, in terms of conditional values, for the input application. (ii) During JIT compilation, PYE resolves the conditions associated with these values, using the pre-computed conditional values for the libraries, to generate the final results. We have implemented the static and the runtime components of PYE in the Soot optimization framework and the OpenJDK HotSpot Server Compiler (C2), respectively. We demonstrate the usability of PYE by instantiating it to perform two context-, flow-, and field-sensitive heap-based analyses: (i) points-to analysis for null-dereference-check elimination; and (ii) escape analysis for synchronization elimination. We evaluate these instantiations against their corresponding state-of-the-art implementations in C2 over a wide range of benchmarks. The extensive evaluation results show that our strategy works quite well and fulfills both the promises it makes: enhanced precision while maintaining efficiency during JIT compilation.
引用
收藏
页数:37
相关论文
共 51 条
[1]  
Ali, 2014, THESIS
[2]   The Jikes research virtual machine project: Building an open-source research community [J].
Alpern, B ;
Augart, S ;
Blackburn, SM ;
Butrico, M ;
Cocchi, A ;
Cheng, P ;
Dolby, J ;
Fink, S ;
Grove, D ;
Hind, M ;
McKinley, KS ;
Mergen, M ;
Moss, JEB ;
Ngo, T ;
Sarkar, V ;
Trapp, M .
IBM SYSTEMS JOURNAL, 2005, 44 (02) :399-417
[3]  
Andersen L. O., 1994, Technical Report
[4]   StubDroid: Automatic Inference of Precise Data-flow Summaries for the Android Framework [J].
Arzt, Steven ;
Bodden, Eric .
2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2016, :725-735
[5]  
Ben Hardekopf, 2007, P 2007 ACM SIGPLAN C, P290
[6]   The DaCapo benchmarks: Java']Java benchmarking development and analysis [J].
Blackburn, Stephen M. ;
Garner, Robin ;
Hoffmann, Chris ;
Khan, Asjad M. ;
McKinley, Kathryn S. ;
Bentzur, Rotem ;
Diwan, Amer ;
Feinberg, Daniel ;
Frampton, Daniel ;
Guyer, Samuel Z. ;
Hirzel, Martin ;
Hosking, Antony ;
Jump, Maria ;
Lee, Han ;
Moss, J. Eliot B. ;
Phansalkar, Aashish ;
Stefanovic, Darko ;
VanDrunen, Thomas ;
von Dincklage, Daniel ;
Wiedermann, Ben .
ACM SIGPLAN NOTICES, 2006, 41 (10) :169-190
[7]   Escape analysis for Java']Java™:: Theory and practice [J].
Blanchet, B .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2003, 25 (06) :713-775
[8]  
Bodden E, 2011, 2011 33RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), P241, DOI 10.1145/1985793.1985827
[9]   Removing unnecessary synchronization in Java']Java [J].
Bogda, J ;
Hölzle, U .
ACM SIGPLAN NOTICES, 1999, 34 (10) :35-46
[10]   Compositional Shape Analysis by Means of Bi-Abduction [J].
Calcagno, Cristiano ;
Distefano, Dino ;
O'Hearn, Peter W. ;
Yang, Hongseok .
JOURNAL OF THE ACM, 2011, 58 (06)