diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2018-10-10 14:44:05 +0200 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2018-10-11 09:32:32 +0000 |
commit | 1b44e883a2be3e107602ef2d3d984f8727fc06ac (patch) | |
tree | 5faa421d2be10cd9564c42b17eff4843740af1a5 /src/mem/cache/blk.hh | |
parent | 160bcba0d6729d37caf65e97a99e2ebdcf71f6a8 (diff) | |
download | gem5-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/blk.hh')
-rw-r--r-- | src/mem/cache/blk.hh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh index cc6d90571..6d91e5584 100644 --- a/src/mem/cache/blk.hh +++ b/src/mem/cache/blk.hh @@ -292,12 +292,12 @@ class CacheBlk : public ReplaceableEntry } /** - * Pretty-print a tag, and interpret state bits to readable form + * Pretty-print tag, set and way, and interpret state bits to readable form * including mapping to a MOESI state. * * @return string with basic state information */ - std::string print() const + virtual std::string print() const { /** * state M O E S I @@ -334,8 +334,9 @@ class CacheBlk : public ReplaceableEntry default: s = 'T'; break; // @TODO add other types } return csprintf("state: %x (%c) valid: %d writable: %d readable: %d " - "dirty: %d tag: %x", status, s, isValid(), - isWritable(), isReadable(), isDirty(), tag); + "dirty: %d | tag: %#x set: %#x way: %#x", status, s, + isValid(), isWritable(), isReadable(), isDirty(), tag, + getSet(), getWay()); } /** |