From 9bd0bfe559d8c9633c5686ccf100ab921eb6eda2 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Tue, 1 Jul 2008 10:24:09 -0400 Subject: After a checkpoint (and thus a stats reset), the not_idle_fraction/notIdleFraction statistic is really wrong. The notIdleFraction statistic isn't updated when the statistics reset, probably because the cpu Status information was pulled into the atomic and timing cpus. This changeset pulls Status back into the BaseSimpleCPU object. Anyone care to comment on the odd naming of the Status instance? It shouldn't just be status because that is confusing with Port::Status, but _status seems a bit strage too. --- src/cpu/simple/base.hh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/cpu/simple/base.hh') diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh index 918965fdb..62bb31de8 100644 --- a/src/cpu/simple/base.hh +++ b/src/cpu/simple/base.hh @@ -129,6 +129,20 @@ class BaseSimpleCPU : public BaseCPU protected: int cpuId; + enum Status { + Idle, + Running, + IcacheRetry, + IcacheWaitResponse, + IcacheWaitSwitch, + DcacheRetry, + DcacheWaitResponse, + DcacheWaitSwitch, + SwitchedOut + }; + + Status _status; + public: #if FULL_SYSTEM -- cgit v1.2.3