diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-09-23 18:16:26 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-09-30 12:34:06 +0000 |
commit | 0d98a7170f50d07d737a6a78e32e6ac3021262ec (patch) | |
tree | a25acfd243a7fbfbe68063237a354d89e4909836 /src/mem/cache/cache.cc | |
parent | 76384ec3ff2a52898aa35a27d337194ae557648a (diff) | |
download | gem5-0d98a7170f50d07d737a6a78e32e6ac3021262ec.tar.xz |
mem-cache: Switch to new-style stats
This change puts cache and tag stats into a Stats::Group struct. This
makes it easier to identify stat updates (they are prefixed with
stat.) and adds hierarchy information for output formats that need it.
Change-Id: I2b8e9138f1cb977abb445ec864d80a79b588481d
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21140
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/mem/cache/cache.cc')
-rw-r--r-- | src/mem/cache/cache.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc index b054cd43d..e7dd5efc9 100644 --- a/src/mem/cache/cache.cc +++ b/src/mem/cache/cache.cc @@ -334,7 +334,7 @@ Cache::handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, // should have flushed and have no valid block assert(!blk || !blk->isValid()); - mshr_uncacheable[pkt->cmdToIndex()][pkt->req->masterId()]++; + stats.cmdStats(pkt).mshr_uncacheable[pkt->req->masterId()]++; if (pkt->isWrite()) { allocateWriteBuffer(pkt, forward_time); @@ -776,7 +776,8 @@ Cache::serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk) assert(!tgt_pkt->req->isUncacheable()); assert(tgt_pkt->req->masterId() < system->maxMasters()); - missLatency[tgt_pkt->cmdToIndex()][tgt_pkt->req->masterId()] += + stats.cmdStats(tgt_pkt) + .missLatency[tgt_pkt->req->masterId()] += completion_time - target.recvTime; } else if (pkt->cmd == MemCmd::UpgradeFailResp) { // failed StoreCond upgrade |