mem-cache: Fix update of useful prefetches
The probe notification must be parsed on every hit, even if the prefetcher is set not to generate prefetches on accesses. This fixes the calculation of useful prefetches. Change-Id: Iff298f7bea11013f411f4ba39dba705fd81a0cd4 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38177 Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
c6933a27da
commit
3b03eaab9c
7
src/mem/cache/prefetch/base.cc
vendored
7
src/mem/cache/prefetch/base.cc
vendored
@@ -125,6 +125,7 @@ Base::observeAccess(const PacketPtr &pkt, bool miss) const
|
||||
bool read = pkt->isRead();
|
||||
bool inv = pkt->isInvalidate();
|
||||
|
||||
if (!miss && !prefetchOnAccess) return false;
|
||||
if (pkt->req->isUncacheable()) return false;
|
||||
if (fetch && !onInst) return false;
|
||||
if (!fetch && !onData) return false;
|
||||
@@ -236,10 +237,8 @@ Base::regProbeListeners()
|
||||
true));
|
||||
listeners.push_back(new PrefetchListener(*this, pm, "Fill", true,
|
||||
false));
|
||||
if (prefetchOnAccess) {
|
||||
listeners.push_back(new PrefetchListener(*this, pm, "Hit", false,
|
||||
false));
|
||||
}
|
||||
listeners.push_back(new PrefetchListener(*this, pm, "Hit", false,
|
||||
false));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user