summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/cpu.hh
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2009-05-05 02:51:31 -0400
committerKorey Sewell <ksewell@umich.edu>2009-05-05 02:51:31 -0400
commitc70241810d4e4f523f173c1646b008dc40faad8e (patch)
treec1bf567e6e035f60835a2217ca283287f163e104 /src/cpu/inorder/cpu.hh
parentdc35d2f125de43fb2b2865e9211cccca8546b8cd (diff)
downloadgem5-c70241810d4e4f523f173c1646b008dc40faad8e.tar.xz
cpus: fix cpu progress event
this was double scheduling itself (once in constructor and once in cpu code). also add support for stopping / starting progress events through repeatEvent flag and also changing the interval of the progress event as well
Diffstat (limited to 'src/cpu/inorder/cpu.hh')
-rw-r--r--src/cpu/inorder/cpu.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh
index 0545f4bf8..744dd5cf9 100644
--- a/src/cpu/inorder/cpu.hh
+++ b/src/cpu/inorder/cpu.hh
@@ -589,6 +589,17 @@ class InOrderCPU : public BaseCPU
return thread[tid]->getTC();
}
+ /** Count the Total Instructions Committed in the CPU. */
+ virtual Counter totalInstructions() const
+ {
+ Counter total(0);
+
+ for (int i=0; i < thread.size(); i++)
+ total += thread[i]->numInst;
+
+ return total;
+ }
+
/** The global sequence number counter. */
InstSeqNum globalSeqNum[ThePipeline::MaxThreads];