diff options
author | Dam Sunwoo <dam.sunwoo@arm.com> | 2012-02-12 16:07:39 -0600 |
---|---|---|
committer | Dam Sunwoo <dam.sunwoo@arm.com> | 2012-02-12 16:07:39 -0600 |
commit | 230540e655efd09ad057e7fde2ac257f355c06d1 (patch) | |
tree | 4555eeff33db9ac5c2f3a1b210627cef4b81d4ad /src/mem/cache/tags/base.cc | |
parent | 8aaa39e93dfe000ad423b585e78a4c2ee7418363 (diff) | |
download | gem5-230540e655efd09ad057e7fde2ac257f355c06d1.tar.xz |
mem: fix cache stats to use request ids correctly
This patch fixes the cache stats to use the new request ids.
Cache stats also display the requestor names in the vector subnames.
Most cache stats now include "nozero" and "nonan" flags to reduce the
amount of excessive cache stat dump. Also, simplified
incMissCount()/incHitCount() functions.
Diffstat (limited to 'src/mem/cache/tags/base.cc')
-rw-r--r-- | src/mem/cache/tags/base.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mem/cache/tags/base.cc b/src/mem/cache/tags/base.cc index ea97954f1..0cabce860 100644 --- a/src/mem/cache/tags/base.cc +++ b/src/mem/cache/tags/base.cc @@ -87,17 +87,23 @@ BaseTags::regStats(const string &name) ; occupancies - .init(cache->numCpus() + 1) + .init(cache->system->maxMasters()) .name(name + ".occ_blocks") - .desc("Average occupied blocks per context") + .desc("Average occupied blocks per requestor") .flags(nozero | nonan) ; + for (int i = 0; i < cache->system->maxMasters(); i++) { + occupancies.subname(i, cache->system->getMasterName(i)); + } avgOccs .name(name + ".occ_percent") .desc("Average percentage of cache occupancy") - .flags(nozero) + .flags(nozero | total) ; + for (int i = 0; i < cache->system->maxMasters(); i++) { + avgOccs.subname(i, cache->system->getMasterName(i)); + } avgOccs = occupancies / Stats::constant(numBlocks); |