summaryrefslogtreecommitdiff
path: root/cpu/simple_cpu/simple_cpu.hh
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2004-05-18 01:40:03 -0400
committerLisa Hsu <hsul@eecs.umich.edu>2004-05-18 01:40:03 -0400
commita0ccdf8aba8f71c8d66c03f5c6907d0a3c2e091f (patch)
tree71de26a0139e7db042c79989ae745377d98c3d23 /cpu/simple_cpu/simple_cpu.hh
parent4d98ab1ca92c2d88d3ee13a7518acc36a6d5bf84 (diff)
parent02af86f7e813db27b12214ea377948f07f891b69 (diff)
downloadgem5-a0ccdf8aba8f71c8d66c03f5c6907d0a3c2e091f.tar.xz
merge m5 with linux for the event and binning lifting
--HG-- extra : convert_revision : 09d3678746c2e9a93a9982dc75d5e1ac309cb2fa
Diffstat (limited to 'cpu/simple_cpu/simple_cpu.hh')
-rw-r--r--cpu/simple_cpu/simple_cpu.hh16
1 files changed, 12 insertions, 4 deletions
diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh
index 4977e6992..a04dcd057 100644
--- a/cpu/simple_cpu/simple_cpu.hh
+++ b/cpu/simple_cpu/simple_cpu.hh
@@ -34,7 +34,7 @@
#include "base/loader/symtab.hh"
#include "cpu/pc_event.hh"
#include "base/statistics.hh"
-
+#include "cpu/exec_context.hh"
// forward declarations
#ifdef FULL_SYSTEM
@@ -46,6 +46,11 @@ class PhysicalMemory;
class RemoteGDB;
class GDBListener;
+
+#else
+
+class Process;
+
#endif // FULL_SYSTEM
class MemInterface;
@@ -204,7 +209,12 @@ class SimpleCPU : public BaseCPU
// number of simulated instructions
Counter numInst;
Counter startNumInst;
- Statistics::Formula numInsts;
+ Statistics::Scalar<> numInsts;
+
+ virtual Counter totalInstructions() const
+ {
+ return numInst - startNumInst;
+ }
// number of simulated memory references
Statistics::Scalar<> numMemRefs;
@@ -300,6 +310,4 @@ class SimpleCPU : public BaseCPU
ExecContext *xcBase() { return xc; }
};
-typedef SimpleCPU SimpleCPUExecContext;
-
#endif // __SIMPLE_CPU_HH__