对堆上数据的频繁访问是Java程序的主要开销,为此,研究者们通过虚拟机收集堆上数据访问的信息,而后采用预取或垃圾收集来改进内存性能.常用的收集方法有采样法和插桩法,但二者无法同时满足细粒度和低开销的要求.针对这两个要求,提出基于插桩分析的虚拟机自适应预取框架,该框架通过插桩收集信息,并根据程序运行时的反馈自适应地调整插桩并进行预取优化.实验结果表明,自适应预取优化在Pentium4上对SPEC JVM98和Dacapo有不同程度的提高,最高的达到了18.1%,而开销控制在4.0%以内.
Accessing to heap data brings main overhead for Java application. VM (virtual machine) researchers utilize prefetch or garbage collection to improve the performance, with the help of collected information of accesses to heap. The general methods to collect information are sampling and program instrumentation, however, they can't satisfy fine granularity and low overhead simultaneously. To satisfy these two requirements, this paper proposes an instrument- analysis framework for adaptive prefetch optimization in JVM, which instruments code to collect profiling information, and guide to dispatch code and perform prefetch according to feedback. The experimental results show that it achieves up to 18.1% speedup in industry-standard benchmark SPEC JVM98 and Dacapo on the Pentium 4, while the overhead is less than 4.0%.