diff options
Diffstat (limited to 'src/cpu/inorder')
-rw-r--r-- | src/cpu/inorder/resources/execution_unit.cc | 16 | ||||
-rw-r--r-- | src/cpu/inorder/resources/execution_unit.hh | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/cpu/inorder/resources/execution_unit.cc b/src/cpu/inorder/resources/execution_unit.cc index 017308585..4b725daf5 100644 --- a/src/cpu/inorder/resources/execution_unit.cc +++ b/src/cpu/inorder/resources/execution_unit.cc @@ -60,6 +60,22 @@ ExecutionUnit::regStats() .name(name() + ".executions") .desc("Number of Instructions Executed."); + + predictedIncorrect + .name(name() + ".mispredicted") + .desc("Number of Branches Incorrectly Predicted"); + + predictedCorrect + .name(name() + ".predicted") + .desc("Number of Branches Incorrectly Predicted"); + + mispredictPct + .name(name() + ".mispredictPct") + .desc("Percentage of Incorrect Branches Predicts") + .precision(6); + mispredictPct = (predictedIncorrect / + (predictedCorrect + predictedIncorrect)) * 100; + Resource::regStats(); } diff --git a/src/cpu/inorder/resources/execution_unit.hh b/src/cpu/inorder/resources/execution_unit.hh index 0a15afdab..e852e3ed0 100644 --- a/src/cpu/inorder/resources/execution_unit.hh +++ b/src/cpu/inorder/resources/execution_unit.hh @@ -70,7 +70,9 @@ class ExecutionUnit : public Resource { ///////////////////////////////////////////////////////////////// Stats::Scalar predictedTakenIncorrect; Stats::Scalar predictedNotTakenIncorrect; - + Stats::Scalar predictedIncorrect; + Stats::Scalar predictedCorrect; + Stats::Formula mispredictPct; Stats::Scalar executions; Tick lastExecuteCycle; }; |