| Java programming language uses garbage collector to deal with the object allocation requests of Java applications and automatically manage the object reclamation in heap. Garbage collector can reduce programmer effort, but it costs a mass of time and space to identify dead objects in heap, so it becomes one of the most important factors that influence the Java Virtual Machine performance.An effective approach to reduce garbage collector automatic reclamation effort is Just-in-time compiler assisted garbage collection (JIT-assisted GC). That is to say, JIT compiler analyses the applications to instrument the explicit "free" instructions and even the special object allocation instructions to assist garbage collector in improving the object allocation and reclamation. Our lab had developed the studies on JIT-assisted GC and implemented a prototype system focuses on improving object reclamation before. The former system, however, can only deal with the single thread and small-scale applications, the performance of object lifetime analysis and instrument algorithm in the former system is low。In order to improve the former system, new object lifetime analysis and instrument algorithms are presented in this paper. This paper mainly depicts and discusses the following works:1,presents an object lifetime analysis algorithm which combines live variable analysis and points-to analysis, to get more precise object lifetime information. The object lifetime algorithm is inter-method and context sensitive, used to indentify the non-global objects and their dead locations.2,based on the results of the object lifetime analysis, presents a instrument algorithm to insert the explicit "free" instructions in applications. The instrument algorithm bases on the domination relations in the control flow and various instrumenting strategies are presented to ensure the validity and flexibility of instrumentation. Moreover, it can initiatively indentify and free the memory spaces that referenced by objects or their fields.3,designs a log system. The log system not only can gain the information about garbage collection and object explicit reclamation, but also can gain the information of each explicit "free" instruction income, laid the foundation for the next study on the object allocation optimization.4,based on the framework of the former JIT-assisted GC system, implements the above work. The object lifetime analysis and HIR instrument transformation is implemented in the form of an optimization pass. The improving JIT-assisted GC system can deal with the multiple threads and large-scale applications and more efficient than the former system. Experimental results show that the improving JIT-assisted GC system can reclaim plentiful memory spaces, reduce GC effort, improve the memory utility and the performance of Java applications efficiently. |