From 27dbffdb006c7bd12ad2489a2d346274fe646720 Mon Sep 17 00:00:00 2001 From: tv-reddy Date: Wed, 19 Feb 2020 23:30:41 -0800 Subject: [PATCH] cpu: change the location of BTBlookup BTBlookup should be done only if BTB is used, previously this stat was updated for indirector predictor as well. https: //gem5.atlassian.net/browse/GEM5-338 Change-Id: I20695dc7a8677d4fd0c4ae9f4f7d279387d5ad62 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25625 Reviewed-by: Jason Lowe-Power Reviewed-by: Ayaz Akram Reviewed-by: Giacomo Travaglini Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/cpu/pred/bpred_unit.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/pred/bpred_unit.cc b/src/cpu/pred/bpred_unit.cc index a2faad1da..3d9e3ea5a 100644 --- a/src/cpu/pred/bpred_unit.cc +++ b/src/cpu/pred/bpred_unit.cc @@ -233,7 +233,6 @@ BPredUnit::predict(const StaticInstPtr &inst, const InstSeqNum &seqNum, "RAS predicted target: %s, RAS index: %i\n", tid, seqNum, pc, target, predict_record.RASIndex); } else { - ++BTBLookups; if (inst->isCall()) { RAS[tid].push(pc); @@ -250,6 +249,7 @@ BPredUnit::predict(const StaticInstPtr &inst, const InstSeqNum &seqNum, } if (inst->isDirectCtrl() || !iPred) { + ++BTBLookups; // Check BTB on direct branches if (BTB.valid(pc.instAddr(), tid)) { ++BTBHits; -- 2.30.2