Java programs are increasing in popularity and prevalence on numerous platforms, including high-performance general-purpose processors. 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 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 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.
[1]
John C. Gyllenhaal,et al.
A study of the cache and branch performance issues with running Java on current hardware platforms
,
1997,
Proceedings IEEE COMPCON 97. Digest of Papers.
[2]
Karel Driesen,et al.
Accurate indirect branch prediction
,
1998,
ISCA.
[3]
Karel Driesen,et al.
The cascaded predictor: economical and adaptive branch target prediction
,
1998,
Proceedings. 31st Annual ACM/IEEE International Symposium on Microarchitecture.
[4]
Narayanan Vijaykrishnan,et al.
Architectural issues in Java runtime systems
,
2000,
Proceedings Sixth International Symposium on High-Performance Computer Architecture. HPCA-6 (Cat. No.PR00550).
[5]
Narayanan Vijaykrishnan,et al.
Using complete system simulation to characterize SPECjvm98 benchmarks
,
2000,
ICS '00.
[6]
Lizy Kurian John,et al.
Understanding control flow transfer and its predictability in java processing
,
2001,
2001 IEEE International Symposium on Performance Analysis of Systems and Software. ISPASS..
[7]
Frank Yellin,et al.
The Java Virtual Machine Specification
,
1996
.
[8]
Yale N. Patt,et al.
Target prediction for indirect jumps
,
1997,
ISCA '97.
[9]
Alan Jay Smith,et al.
Branch Prediction Strategies and Branch Target Buffer Design
,
1995,
Computer.
[10]
Narayanan Vijaykrishnan,et al.
Tuning Branch Predictors to Support Virtual Method Invocation in Java
,
1999,
COOTS.
[11]
Anoop Gupta,et al.
Complete computer system simulation: the SimOS approach
,
1995,
IEEE Parallel Distributed Technol. Syst. Appl..