summaryrefslogtreecommitdiff
path: root/src/cpu/base.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r--src/cpu/base.hh19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 93e5476ef..74c1a8762 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -331,7 +331,9 @@ class BaseCPU : public MemObject
*/
virtual BranchPred *getBranchPred() { return NULL; };
- virtual Counter totalInstructions() const = 0;
+ virtual Counter totalInsts() const = 0;
+
+ virtual Counter totalOps() const = 0;
// Function tracing
private:
@@ -354,13 +356,24 @@ class BaseCPU : public MemObject
}
static int numSimulatedCPUs() { return cpuList.size(); }
- static Counter numSimulatedInstructions()
+ static Counter numSimulatedInsts()
+ {
+ Counter total = 0;
+
+ int size = cpuList.size();
+ for (int i = 0; i < size; ++i)
+ total += cpuList[i]->totalInsts();
+
+ return total;
+ }
+
+ static Counter numSimulatedOps()
{
Counter total = 0;
int size = cpuList.size();
for (int i = 0; i < size; ++i)
- total += cpuList[i]->totalInstructions();
+ total += cpuList[i]->totalOps();
return total;
}