Optimizing indirect branch prediction accuracy in virtual machine interpreters

Optimizing indirect branch prediction accuracy in virtual machine interpreters
复制标题

优化虚拟机解释器中的间接分支预测准确性

DOI:
10.1145/781131.781162
复制
发表时间:
2003
期刊:
Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation
影响因子:
--
通讯作者:
David. Gregg
David. Gregg
中科院分区:
--
文献类型:
--
作者:
M. Ertl;David. Gregg

文献摘要

被引文献

相似文献

设计用于效率的口译员执行大量间接分支,并且可以在间接分支错误预测中花费超过一半的执行时间。分支目标缓冲区是间接分支预测的最佳广泛可用形式。但是,它们对现有口译员的预测准确性仅为2%-50%。在本文中,我们研究了两种方法,用于提高BTB对口译人员的预测准确性:复制虚拟机(VM)指令,并将VM指令的序列组合到上级结构中。我们研究了这些技术的静态(解释器构建时间)和动态(解释器运行时)变体,并比较它们以及这些技术的几种组合。这些技术几乎可以消除所有调度分支的错误预测,并具有其他好处,从而超过高效的螺纹代码解释器的加速度高达3.17,而加速速度高达1.3倍,而不是仅依靠整体建设的技术。
Interpreters designed for efficiency execute a huge number of indirect branches and can spend more than half of the execution time in indirect branch mispredictions. Branch target buffers are the best widely available form of indirect branch prediction; however, their prediction accuracy for existing interpreters is only 2%--50%. In this paper we investigate two methods for improving the prediction accuracy of BTBs for interpreters: replicating virtual machine (VM) instructions and combining sequences of VM instructions into superinstructions. We investigate static (interpreter build-time) and dynamic (interpreter run-time) variants of these techniques and compare them and several combinations of these techniques. These techniques can eliminate nearly all of the dispatch branch mispredictions, and have other benefits, resulting in speedups by a factor of up to 3.17 over efficient threaded-code interpreters, and speedups by a factor of up to 1.3 over techniques relying on superinstructions alone.