mem-cache: show in DPPRINTF if block is prefetched

Add the prefetch status in the DPRINTF showing the
state of a cache block.

Change-Id: Ib8edf882dc17414f751cc8773d9035ee2887e971
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47202
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
diff --git a/src/mem/cache/cache_blk.hh b/src/mem/cache/cache_blk.hh
index bac0c8a..b3eed9a 100644
--- a/src/mem/cache/cache_blk.hh
+++ b/src/mem/cache/cache_blk.hh
@@ -399,8 +399,9 @@
           default:    s = 'T'; break; // @TODO add other types
         }
         return csprintf("state: %x (%c) writable: %d readable: %d "
-            "dirty: %d | %s", coherence, s, isSet(WritableBit),
-            isSet(ReadableBit), isSet(DirtyBit), TaggedEntry::print());
+            "dirty: %d prefetched: %d | %s", coherence, s,
+            isSet(WritableBit), isSet(ReadableBit), isSet(DirtyBit),
+            wasPrefetched(), TaggedEntry::print());
     }
 
     /**