Adapting branch-target buffer to improve the target predictability of java code

Adapting branch-target buffer to improve the target predictability of java code
复制标题

调整分支目标缓冲区以提高java代码的目标可预测性

DOI:
10.1145/1071604.1071605
复制
发表时间:
2005
期刊:
ACM Trans. Archit. Code Optim.
影响因子:
--
通讯作者:
L. John
L. John
中科院分区:
--
文献类型:
--
作者:
Tao Li;Ravi Bhargava;L. John

文献摘要

被引文献

相似文献

Java 程序在众多平台(包括高性能通用处理器)上越来越受欢迎和普及。 Java 技术的成功很大程度上取决于可移植 Java 字节码的执行效率。然而,Java 运行时系统的动态特性给微架构设计的多个方面带来了独特的性能挑战。在这项工作中,我们重点研究间接分支对分支目标地址预测性能的影响。运行时字节码翻译、即时(JIT)编译、对本机接口库的频繁调用以及对虚方法的依赖增加了多态间接分支的频率。因此,准确预测间接分支的目标地址对于Java代码来说非常重要。本文描述了Java处理中的间接分支行为,并提出了一种自适应分支目标缓冲区(BTB)设计来增强目标的可预测性。我们的表征表明,传统的 BTB 会频繁地错误预测一些多态间接分支,从而显着降低 Java 处理中的预测器准确性。因此,我们提出了一种可重新哈希的分支目标缓冲区(R-BTB),它动态识别多态间接分支并调整分支目标存储以适应分支的多个目标。R-BTB提高了间接分支的目标可预测性,而不牺牲总体目标预测精度。仿真表明,R-BTB 消除了传统 BTB 在解释器模式下运行的 Java 程序所遭受的间接分支错误预测的 61%(JIT 模式下为 46%),这导致总体目标地址错误预测率降低了 57%(JIT 模式下为 29%)。在条目数量相同的情况下,R-BTB 通过适应更多种类的间接分支行为,也优于之前为大多数 Java 程序提出的目标缓存方案。
Java programs are increasing in popularity and prevalence on numerous platforms, including high-performance general-purpose processors. The success of Java technology largely depends on the efficiency in executing the portable Java bytecodes. However, the dynamic characteristics of the Java runtime system present unique performance challenges for several aspects of microarchitecture design. In this work, we focus on the effects of indirect branches on branch-target address prediction performance. Runtime bytecode translation, just-in-time (JIT) compilation, frequent calls to the native interface libraries, and dependence on virtual methods increase the frequency of polymorphic indirect branches. Therefore, accurate target address prediction for indirect branches is very important for Java code.This paper characterizes the indirect branch behavior in Java processing and proposes an adaptive branch-target buffer (BTB) design to enhance the predictability of the targets. Our characterization shows that a traditional BTB will frequently mispredict a few polymorphic indirect branches, significantly deteriorating predictor accuracy in Java processing. Therefore, we propose a rehashable branch-target buffer (R-BTB), which dynamically identifies polymorphic indirect branches and adapts branch-target storage to accommodate multiple targets for a branch.The R-BTB improves the target predictability of indirect branches without sacrificing overall target prediction accuracy. Simulations show that the R-BTB eliminates 61% of the indirect branch mispredictions suffered with a traditional BTB for Java programs running in interpreter mode (46% in JIT mode), which leads to a 57% decrease in overall target address misprediction rate (29% in JIT mode). With an equivalent number of entries, the R-BTB also outperforms the previously proposed target cache scheme for a majority of Java programs by adapting to a greater variety of indirect branch behaviors.