summaryrefslogtreecommitdiff
path: root/src/mem/cache/base.cc
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-10-10 14:44:05 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-10-11 09:32:32 +0000
commit1b44e883a2be3e107602ef2d3d984f8727fc06ac (patch)
tree5faa421d2be10cd9564c42b17eff4843740af1a5 /src/mem/cache/base.cc
parent160bcba0d6729d37caf65e97a99e2ebdcf71f6a8 (diff)
downloadgem5-1b44e883a2be3e107602ef2d3d984f8727fc06ac.tar.xz
mem-cache: Virtualize block print
Encapsulate and virtualize block print, so that relevant information can be easily printed anywhere. Change-Id: I91109c29c126755183a0fd2b4446f5335e64076b Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/13415 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/base.cc')
-rw-r--r--src/mem/cache/base.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index 736f16761..0eeb19252 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -52,6 +52,7 @@
#include "base/logging.hh"
#include "debug/Cache.hh"
#include "debug/CachePort.hh"
+#include "debug/CacheRepl.hh"
#include "debug/CacheVerbose.hh"
#include "mem/cache/mshr.hh"
#include "mem/cache/prefetch/base.hh"
@@ -1237,6 +1238,9 @@ BaseCache::allocateBlock(const PacketPtr pkt, PacketList &writebacks)
if (!victim)
return nullptr;
+ // Print victim block's information
+ DPRINTF(CacheRepl, "Replacement victim: %s\n", victim->print());
+
// Check for transient state allocations. If any of the entries listed
// for eviction has a transient state, the allocation fails
for (const auto& blk : evict_blks) {