一种基于Java虚拟机的动静结合自适应优化方法
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:A static and dynamic adaptive optimization method based on Java virtual machine
  • 作者:张海军 ; 郑艳 ; 叶俊 ; 白书敬
  • 英文作者:ZHANG Hai-jun;ZHENG Yan;YE Jun;BAI Shu-jing;Jiangnan Institute of Computing Technology;Wuxi City College of Vocational Technology;
  • 关键词:Java虚拟机 ; 自适应优化 ; 迭代编译 ; 实例学习 ; 资源库
  • 英文关键词:Java virtual machine;;adaptive optimization;;iterative compilation;;instance learning;;resource library
  • 中文刊名:JSJK
  • 英文刊名:Computer Engineering & Science
  • 机构:江南计算技术研究所;无锡城市职业技术学院;
  • 出版日期:2019-06-15
  • 出版单位:计算机工程与科学
  • 年:2019
  • 期:v.41;No.294
  • 语种:中文;
  • 页:JSJK201906004
  • 页数:6
  • CN:06
  • ISSN:43-1258/TP
  • 分类号:31-36
摘要
动态语言可以利用程序运行时获取的动态信息,指导程序进行各种优化。但是,现有的Java虚拟机没有将运行过程中收集的信息有效利用,而是在运行结束后直接丢弃,下一次执行程序的时候重新监测、收集、优化需要的信息。基于HotSpot虚拟机提出一种动静结合的自适应优化方法,将运行过程中优化对象迭代搜索到的最佳参数或者信息保存到资源库中;能够从资源库中学习获得适合当前程序的最佳参数或选项,可有效地利用运行过程中积累的数据;资源分析是静态且离线的,不占用应用程序运行的开销;迭代学习的过程中,通过避免冗余实例入库以及从库中剔除噪声实例,保证资源库学习过程的精度与效率。实验表明,该框架对指导Java虚拟机在不同的平台上自适应优化具有一定的实用性。
        Dynamic language can take advantage of the profiling information at runtime to guide various optimizations of the program. However, the existing JAVA virtual machine does not effectively utilize the information collected at runtime, and directly discards it at the end. It re-monitors and collects the information needed for optimization when the program is executed again. We therefore propose a static and dynamic adaptive optimization method based on HotSpot virtual machine, which saves the optimal parameters or information obtained by the optimized object iterative search at runtime into the resource library. It can learn from the resource library to obtain the best parameters or options suitable for the current program, and effectively use the data accumulated at runtime. Resource analysis is static and offline, and does not take up the overhead for running the application. In the process of iterative learning, the accuracy and efficiency of the resource library learning process are ensured by avoiding redundancy instances to enter the library and removing noise instances from the library. Experiments show that the proposal is practical in guiding the adaptive optimization for Java virtual machine on different platforms.
引文
[1] Arnold M,Fink S,Grove D,et al.Architecture and policy for adaptive optimization in virtual machines:RC23429[R].New York:IBM Research,2004.
    [2] Chuyko D.Hotspot & AOT,Now it’s time to compile[EB/OL].[2016-04-30].http://www.slidesshare.net.
    [3] Kotzmann T.Escape analysis in the context of dynamic compilation and deoptimization[D].Linz:Institute for System Software,Johannes Kepler University Linz,2005.
    [4] van den Brink H.The current and future optimizations performed by the Java HotSpot compiler [EB/OL].[2009-11-17].http://mijnadres.net.
    [5] Wimmer C.Automatic object inlining in a Java virtual machine [D].Linz:Institute for System Software,Johannes Kepler University Linz,2008.
    [6] Arnoldy M,Welczy A,Rajan V T.Improving virtual machine performance using a cross-run profile repository[C]//Proc of OOPSLA’05,2005:297-311.
    [7] Sandya S M.Jazzing up JVMs with off-line profile data,does it pay [J].ACM SIGPLAN Notices,2004,39(8):72-80.
    [8] Kulkarni S,Cavazos J,Wimmer C,et al.Automatic construction of inlining heuristics using machine learning[C]//Proc of the 2013 IEEE/ACM International Symposium on Code Generation and Optimization (CGO),2013:1-12.
    [9] Java source code [EB/OL].[2018-10-17].http://hg.openjdk.java.net/.
    [10] The Java HotSpot virtual machine technical white paper[R].California:Sun Microsystems,Inc.,2001.
    [11] Zhou Zhi-ming.Understanding the JVM:Advanced features and best practice [M].Beijing:China Machine Press,2013.(in Chinese)
    [12] Hotspot groups [EB/OL].[2018-10-17].http://openjdk.java.net/groups/hotspot.
    [13] Kisuki T,Knijnenburg P M W,O’Boyle M F P,et al.Iterative compilation in program optimization[C]//Proc of the 8th International Workshop on Compilers for Parallel Computers,2000:35-44.
    [14] Arnold M,Fink S J,Grove D,et al.A survey of adaptive optimization in virtual machines[C]//Proceedings of the IEEE,2005,93(2):449-466.
    [15] Long S,O’Boyle M.Adaptive Java optimization using instance-based learning[C]//Proc of the 18th ACM International Conference on Supercomputing,2004:237-246.
    [16] Ma Xiao-dong,Li Zhong-sheng,Qi Feng-bin,et al.Iterative compilation method based on incremental instance learning [J].Computer Engineering,2012,38(3):4-6.(in Chinese)
    [17] Blackburn S M,Garner R,Hoffmann C,et al.The DaCapo benchmarks:Java benchmarking development and analysis[C]//Proc of OOPSLA ’06,2006:169-190.
    [18] SPEC2008_1_01.Specjvm2008 benchmarks [EB/OL].[2018-12-11].http://www.spec.org/jvm2008.
    [11] 周志明.深入理解Java虚拟机:JVM高级特性与最佳实践[M].北京:机械工业出版社,2013.
    [16] 马晓东,李中升,漆锋滨,等.一种基于增量式实例学习的迭代编译方法[J].计算机工程,2012,38(3):4-6.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700