首页 | 本学科首页   官方微博 | 高级检索  
     

一种面向解释器的间接转移预测技术
引用本文:黄明凯, 刘先华, 谭明星, 谢子超, 程旭. 一种面向解释器的间接转移预测技术[J]. 计算机研究与发展, 2015, 52(1): 66-82. DOI: 10.7544/issn1000-1239.2015.20130970
作者姓名:黄明凯  刘先华  谭明星  谢子超  程旭
作者单位:(北京大学微处理器研究开发中心 北京 100871) (北京大学微处理器及系统教育部工程研究中心 北京 100871) (huangmingkai@mprc.pku.edu.cn)
基金项目:“核高基”国家科技重大专项基金项目,国家自然科学基金项目,北京市自然科学基金项目
摘    要:解释器广泛应用于Java虚拟机、JavaScript执行引擎等托管运行环境中.解释器通常使用间接转移指令实现字节码分派.在现代多发射多级流水的微处理器中,间接转移预测失效严重制约解释器的性能.针对解释器提出了一种字节码指针引导的间接转移预测技术,其核心思想是使用解释器特有的字节码指针值区分不同的间接转移场景.该技术使用软硬件协同的方式,解释器中插入专门的引导指令以标记字节码指针,预测器在运行时刻使用字节码指针值预测转移目标地址.实验结果表明,该技术与常用的转移目标缓冲预测器相比,能提升Java解释器的性能达34.7%,能提升JavaScript解释器的性能达8.3%,与专用的硬件间接转移预测器TTC(tagged target cache)相比,也能提升Java解释器的性能达21.9%.

关 键 词:解释器  间接转移预测  软硬件协同  引导指令  字节码指针

An Indirect Branch Prediction for Interpreters
Huang Mingkai, Liu Xianhua, Tan Mingxing, Xie Zichao, Cheng Xu. An Indirect Branch Prediction for Interpreters[J]. Journal of Computer Research and Development, 2015, 52(1): 66-82. DOI: 10.7544/issn1000-1239.2015.20130970
Authors:Huang Mingkai  Liu Xianhua  Tan Mingxing  Xie Zichao  Cheng Xu
Affiliation:(Microprocessor Research & Development Center, Peking University, Beijing 100871) (Engineering Research Center of Microprocessor & System (Peking University), Ministry of Education, Beijing 100871)
Abstract:Interpreters are widely used in Java virtual machines, JavaScript execution engines and other managed runtime environments. Interpreters usually use indirect branches to dispatch bytecodes. Indirect branch mispredictions are becoming a critical limit of interpreters’ performance in modern multi-issue multi-stage pipeline microprocessors. This paper proposes a bytecode pointer guided indirect (BGI) branch prediction for interpreters. The key idea is to use interpreter-specific bytecode pointer value to distinguish different indirect branch occurrences. It can improve the prediction accuracy of indirect branches in interpreters, so as to improve the performance of interpreters. Microprocessors usually use BTB to predict branch target addresses. BTB can’t accurately predict the rapidly changing branch target addresses of indirect branches in interpreters because it stores only one target address for one indirect branch. Our technique requires software-hardware cooperation, where interpreter software is augmented with specialized hint instructions to indicate bytecode pointers, and then the branch predictor makes use of the bytecode pointer value to store different target addresses of one indirect branch in different entries of BTB at runtime, so as to improve the prediction accuracy. Experimental results show that it improves the performance by 347% for Java interpreter and by 8.3% for JavaScript interpreter over the most commonly used BTB prediction, and it improves the performance by 21.9% for Java interpreter over the specialized indirect branch predictor TTC.
Keywords:interpreter  indirect branch prediction  software-hardware cooperation  hint instruction  bytecode pointer
本文献已被 万方数据 等数据库收录!
点击此处可从《计算机研究与发展》浏览原始摘要信息
点击此处可从《计算机研究与发展》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号