diff options
Diffstat (limited to 'src/mem/cache/base.cc')
-rw-r--r-- | src/mem/cache/base.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc index 278329152..2b7fa4b9f 100644 --- a/src/mem/cache/base.cc +++ b/src/mem/cache/base.cc @@ -38,6 +38,7 @@ #include "debug/Cache.hh" #include "mem/cache/base.hh" #include "mem/cache/mshr.hh" +#include "sim/full_system.hh" using namespace std; @@ -149,11 +150,7 @@ BaseCache::regStats() const string &cstr = cmd.toString(); hits[access_idx] -#if FULL_SYSTEM - .init(_numCpus + 1) -#else - .init(_numCpus) -#endif + .init(FullSystem ? (_numCpus + 1) : _numCpus) .name(name() + "." + cstr + "_hits") .desc("number of " + cstr + " hits") .flags(total | nozero | nonan) @@ -190,11 +187,7 @@ BaseCache::regStats() const string &cstr = cmd.toString(); misses[access_idx] -#if FULL_SYSTEM - .init(_numCpus + 1) -#else - .init(_numCpus) -#endif + .init(FullSystem ? (_numCpus + 1) : _numCpus) .name(name() + "." + cstr + "_misses") .desc("number of " + cstr + " misses") .flags(total | nozero | nonan) |