summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch/stride.hh
diff options
context:
space:
mode:
authorDaniel <odanrc@yahoo.com.br>2018-11-13 20:59:50 +0100
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-11-15 16:52:44 +0000
commit359a2ef70996fb4ed64d09421344eef2e4c85ab1 (patch)
treefe69ccbf8f810200db532d5dedde23fe76458a10 /src/mem/cache/prefetch/stride.hh
parent67e45b872a0bd268e3ce4158c25c6f27e8b0d42e (diff)
downloadgem5-359a2ef70996fb4ed64d09421344eef2e4c85ab1.tar.xz
mem-cache: Return entry in StridePrefetcher::pcTableHit()
Return a pointer to the entry instead of returning a boolean and passing a pointer reference. As a side effect, change the name of the function to be more descriptive of the functionality. Change-Id: Iad44979e98031754c1d0857b1790c0eaf77e9765 Signed-off-by: Daniel <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/14356 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/prefetch/stride.hh')
-rw-r--r--src/mem/cache/prefetch/stride.hh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mem/cache/prefetch/stride.hh b/src/mem/cache/prefetch/stride.hh
index 03ceec584..605b5432d 100644
--- a/src/mem/cache/prefetch/stride.hh
+++ b/src/mem/cache/prefetch/stride.hh
@@ -110,7 +110,16 @@ class StridePrefetcher : public QueuedPrefetcher
};
PCTable pcTable;
- bool pcTableHit(Addr pc, bool is_secure, int master_id, StrideEntry* &entry);
+ /**
+ * Search for an entry in the pc table.
+ *
+ * @param pc The PC to look for.
+ * @param is_secure True if the target memory space is secure.
+ * @param master_id The context.
+ * @return Pointer to the entry.
+ */
+ StrideEntry* findEntry(Addr pc, bool is_secure, int master_id);
+
StrideEntry* pcTableVictim(Addr pc, int master_id);
Addr pcHash(Addr pc) const;