摘要
提出一种对象生命期分析算法,利用即时编译器分析应用程序并在其中安插显式释放对象等指令,通过辅助垃圾收集器改进对象的回收与分配来减轻垃圾收集器自动回收的负担.该算法结合了活跃变量分析和指针逃逸分析,对Java程序的每个方法仅分析一次,而且是过程间的,对域、上下文是敏感的,能够分析识别应用程序中的非全局对象及其死亡位置.实验结果表明:算法的执行时间占总编译时间的3.6%~5.3%;相比一般的Salagnac等指针逃逸分析,能识别出更多的对象生命期信息,而且对象死亡位置能精确到Java方法控制流图中的基本块;在即时编译器辅助的垃圾收集优化中能够显式地回收较多的内存空间.
An object lifetime analysis algorithm is presented, which analyzes Java applications in just-in-time compiler in order to insert instructions to explicitly "free" objects into the applications, and reduces garbage collection overhead by assisting garbage collector in improving object allocation and reclamation. The proposed algorithm combines the live variable analysis and the pointer and escape analysis, and analyzes each method in Java applications only once. Moreover, the algorithm is inter-procedural, field sensitive and context sensitive, which can identify nonglobal objects and their dead locations in Java applications. Experimental results show that the proposed algorithm consumes 3.6%-5.3% of the total compilation time. The algorithm not only can identify the lifetime information of more objects than traditional ordinary escape analysis (such as that of Salagnac, et al), but also can determine the object dead locations with the basic block precision in control flow graph of a method; Moreover, the algorithm can explicitly reclaims more memory spaces in just-in-time compiler assisted garbage collection.
出处
《西安交通大学学报》
EI
CAS
CSCD
北大核心
2010年第2期50-55,共6页
Journal of Xi'an Jiaotong University
基金
Intel公司研究基金资助项目
国家自然科学基金资助项目(60673126)
关键词
对象生命期
活跃变量分析
指针逃逸分析
内存管理优化
object lifetime
live variable analysis
pointer and escape analysis
memory management optimization