summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch/stride.cc
diff options
context:
space:
mode:
authorRekai Gonzalez Alberquilla <Rekai.GonzalezAlberquilla@arm.com>2016-04-07 11:32:38 -0500
committerRekai Gonzalez Alberquilla <Rekai.GonzalezAlberquilla@arm.com>2016-04-07 11:32:38 -0500
commitaf27586fbc75480725fbef0564775fe5aa8cc8d8 (patch)
tree172bc90811714896da278d16d97edbbb1f3fe4e2 /src/mem/cache/prefetch/stride.cc
parentdad7d9277b571305ee248cd761a7dbb9400b3681 (diff)
downloadgem5-af27586fbc75480725fbef0564775fe5aa8cc8d8.tar.xz
mem: Add priority to QueuedPrefetcher
Queued prefetcher entries now count with a priority field. The idea is to add packets ordered by priority and then by age. For the existing algorithms in which priority doesn't make sense, it is set to 0 for all deferred packets in the queue.
Diffstat (limited to 'src/mem/cache/prefetch/stride.cc')
-rw-r--r--src/mem/cache/prefetch/stride.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem/cache/prefetch/stride.cc b/src/mem/cache/prefetch/stride.cc
index 4456cf237..6b8fee828 100644
--- a/src/mem/cache/prefetch/stride.cc
+++ b/src/mem/cache/prefetch/stride.cc
@@ -98,7 +98,7 @@ StridePrefetcher::PCTable::~PCTable() {
void
StridePrefetcher::calculatePrefetch(const PacketPtr &pkt,
- std::vector<Addr> &addresses)
+ std::vector<AddrPriority> &addresses)
{
if (!pkt->req->hasPC()) {
DPRINTF(HWPrefetch, "Ignoring request with no PC.\n");
@@ -153,7 +153,7 @@ StridePrefetcher::calculatePrefetch(const PacketPtr &pkt,
Addr new_addr = pkt_addr + d * prefetch_stride;
if (samePage(pkt_addr, new_addr)) {
DPRINTF(HWPrefetch, "Queuing prefetch to %#x.\n", new_addr);
- addresses.push_back(new_addr);
+ addresses.push_back(AddrPriority(new_addr, 0));
} else {
// Record the number of page crossing prefetches generated
pfSpanPage += degree - d + 1;