在编译辅助的垃圾收集系统中,由于方法的动态绑定等特性,编译时的分析算法保守处理虚方法调用,从而难以识别并显式回收在虚方法调用期间变为不活跃的对象.提出一种改进Java库方法调用的生命期分析策略:它以指向逃逸图为基础来抽象描述库方法对堆中对象活跃状态的改变模式,并将堆变化模式应用到Java程序的对象生命期分析中,从而增强现有对象回收技术对库调用分析的精确性.通过将本文方法应用到Jolden测试程序集中对String相关类的库调用的分析,结果表明新方法以平均增加12%的编译时间开销将显式回收对象的大小提升了33%-37%.
In compiler-assisted garbage collecting systems, compile-time analysis algorithms often conservatively analyze virtual method calls, accordingly losing opportunity to explicitly free inactive ( dead ) objects during the execution of those method calls. A novel scheme is proposed to improve object lifetime analysis on Java library method calls, which is based on describing transition patterns of heap caused by library method calls using point-to escape graph abstraction. The transition patterns can be combined with previous object lifetime analysis algorithms to improve the precision of analysis. By applying the scheme to method calls of String and its related classes, experimental results suggest that the scheme may be realistic and useful i increasing the size of explicitly reclaimed objects by 33% -37% in the 12% additional cost of compile time on Jolden benchmarks.