summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources/bpred_unit.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2010-03-22 17:19:48 -0400
committerKorey Sewell <ksewell@umich.edu>2010-03-22 17:19:48 -0400
commit2620e08722b38660658d46cdb76c337db18e877c (patch)
treef72336cb94b0e1dffae7857c68c484f83c1114bf /src/cpu/inorder/resources/bpred_unit.cc
parent0170e851de4b06f8839f25bfa9551e02ec4f24b3 (diff)
downloadgem5-2620e08722b38660658d46cdb76c337db18e877c.tar.xz
inorder: import name for addtl. bpred stats
Diffstat (limited to 'src/cpu/inorder/resources/bpred_unit.cc')
-rw-r--r--src/cpu/inorder/resources/bpred_unit.cc32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/cpu/inorder/resources/bpred_unit.cc b/src/cpu/inorder/resources/bpred_unit.cc
index c9674a0b5..c4bb61974 100644
--- a/src/cpu/inorder/resources/bpred_unit.cc
+++ b/src/cpu/inorder/resources/bpred_unit.cc
@@ -39,10 +39,9 @@
using namespace std;
using namespace ThePipeline;
-BPredUnit::BPredUnit(ThePipeline::Params *params)
- : BTB(params->BTBEntries,
- params->BTBTagSize,
- params->instShiftAmt)
+BPredUnit::BPredUnit(Resource *_res, ThePipeline::Params *params)
+ : res(_res),
+ BTB(params->BTBEntries, params->BTBTagSize, params->instShiftAmt)
{
// Setup the selected predictor.
if (params->predType == "local") {
@@ -70,48 +69,47 @@ BPredUnit::BPredUnit(ThePipeline::Params *params)
RAS[i].init(params->RASSize);
}
+std::string
+BPredUnit::name()
+{
+ return res->name();
+}
void
BPredUnit::regStats()
{
lookups
- .name(name() + ".BPredUnit.lookups")
+ .name(name() + ".lookups")
.desc("Number of BP lookups")
;
condPredicted
- .name(name() + ".BPredUnit.condPredicted")
+ .name(name() + ".condPredicted")
.desc("Number of conditional branches predicted")
;
condIncorrect
- .name(name() + ".BPredUnit.condIncorrect")
+ .name(name() + ".condIncorrect")
.desc("Number of conditional branches incorrect")
;
BTBLookups
- .name(name() + ".BPredUnit.BTBLookups")
+ .name(name() + ".BTBLookups")
.desc("Number of BTB lookups")
;
BTBHits
- .name(name() + ".BPredUnit.BTBHits")
+ .name(name() + ".BTBHits")
.desc("Number of BTB hits")
;
- BTBCorrect
- .name(name() + ".BPredUnit.BTBCorrect")
- .desc("Number of correct BTB predictions (this stat may not "
- "work properly.")
- ;
-
usedRAS
- .name(name() + ".BPredUnit.usedRAS")
+ .name(name() + ".usedRAS")
.desc("Number of times the RAS was used to get a target.")
;
RASIncorrect
- .name(name() + ".BPredUnit.RASInCorrect")
+ .name(name() + ".RASInCorrect")
.desc("Number of incorrect RAS predictions.")
;
}