summaryrefslogtreecommitdiff
path: root/src/cpu/o3
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/o3')
-rw-r--r--src/cpu/o3/base_dyn_inst.cc4
-rw-r--r--src/cpu/o3/cpu.cc3
-rw-r--r--src/cpu/o3/cpu.hh5
3 files changed, 8 insertions, 4 deletions
diff --git a/src/cpu/o3/base_dyn_inst.cc b/src/cpu/o3/base_dyn_inst.cc
index 3cf89e1b6..510109d8a 100644
--- a/src/cpu/o3/base_dyn_inst.cc
+++ b/src/cpu/o3/base_dyn_inst.cc
@@ -34,7 +34,3 @@
// Explicit instantiation
template class BaseDynInst<O3CPUImpl>;
-
-template <>
-int
-BaseDynInst<O3CPUImpl>::instcount = 0;
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 26c155262..7320d5638 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -159,6 +159,9 @@ FullO3CPU<Impl>::FullO3CPU(DerivO3CPUParams *params)
itb(params->itb),
dtb(params->dtb),
tickEvent(this),
+#ifndef NDEBUG
+ instcount(0),
+#endif
removeInstsThisCycle(false),
fetch(this, params),
decode(this, params),
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index c60c20d55..d24e8c383 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -576,6 +576,11 @@ class FullO3CPU : public BaseO3CPU
void dumpInsts();
public:
+#ifndef NDEBUG
+ /** Count of total number of dynamic instructions in flight. */
+ int instcount;
+#endif
+
/** List of all the instructions in flight. */
std::list<DynInstPtr> instList;