summaryrefslogtreecommitdiff
path: root/cpu/simple_cpu/simple_cpu.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-12-08 14:01:48 -0500
committerNathan Binkert <binkertn@umich.edu>2003-12-08 14:01:48 -0500
commit1d7c11af7d876e758e7afce47782563aefdcdcc7 (patch)
treec42cad0e4b7b9aaa4abfdfb93c56a06f20a1354b /cpu/simple_cpu/simple_cpu.hh
parent0ff2457bfaa223c70d431d100c5b5a92540ff6e2 (diff)
downloadgem5-1d7c11af7d876e758e7afce47782563aefdcdcc7.tar.xz
Instead of keeping track of the fraction of time that we're
idle, keep track of the fraction of time we're not idle. This works better because the default processor state is idle, and the default stat value is 0. Keep the stat as idleFraction which is a formula that is equal to 1 - notIdleFraction --HG-- extra : convert_revision : 331c2e46f45ae0abda46988567ac2c4f7c42ccad
Diffstat (limited to 'cpu/simple_cpu/simple_cpu.hh')
-rw-r--r--cpu/simple_cpu/simple_cpu.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh
index e497559ce..666fe490b 100644
--- a/cpu/simple_cpu/simple_cpu.hh
+++ b/cpu/simple_cpu/simple_cpu.hh
@@ -193,7 +193,8 @@ class SimpleCPU : public BaseCPU
Counter startNumLoad;
// number of idle cycles
- Statistics::Average<> idleFraction;
+ Statistics::Average<> notIdleFraction;
+ Statistics::Formula idleFraction;
// number of cycles stalled for I-cache misses
Statistics::Scalar<> icacheStallCycles;