Javier Bueno Hedo has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/17733 )
Change subject: mem-cache: Fix panic in Indirect Memory prefetcher
......................................................................
mem-cache: Fix panic in Indirect Memory prefetcher
Memory requests with a size non-power-of-two and less than 8 values were
causing
a panic, but there these should be allowed and ignored by the prefetcher.
Change-Id: I86baa60058cc8a7f232d6ba5748d4c24a463c840
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17733
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikole...@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikole...@arm.com>
---
M src/mem/cache/prefetch/indirect_memory.cc
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Nikos Nikoleris: Looks good to me, approved; Looks good to me, approved
Daniel Carvalho: Looks good to me, approved
diff --git a/src/mem/cache/prefetch/indirect_memory.cc
b/src/mem/cache/prefetch/indirect_memory.cc
index 393958c..d49652f 100644
--- a/src/mem/cache/prefetch/indirect_memory.cc
+++ b/src/mem/cache/prefetch/indirect_memory.cc
@@ -108,6 +108,7 @@
if (!miss && !pfi.isWrite() && pfi.getSize() <= 8) {
int64_t index = 0;
+ bool read_index = true;
switch(pfi.getSize()) {
case sizeof(uint8_t):
index = pfi.get<uint8_t>(byteOrder);
@@ -122,14 +123,15 @@
index = pfi.get<uint64_t>(byteOrder);
break;
default:
- panic("Invalid access size\n");
+ // Ignore non-power-of-two sizes
+ read_index = false;
}
- if (!pt_entry->enabled) {
+ if (read_index && !pt_entry->enabled) {
// Not enabled (no pattern detected in this
stream),
// add or update an entry in the pattern detector
and
// start tracking misses
allocateOrUpdateIPDEntry(pt_entry, index);
- } else {
+ } else if (read_index) {
// Enabled entry, update the index
pt_entry->index = index;
if (!pt_entry->increasedIndirectCounter) {
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17733
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I86baa60058cc8a7f232d6ba5748d4c24a463c840
Gerrit-Change-Number: 17733
Gerrit-PatchSet: 2
Gerrit-Owner: Javier Bueno Hedo <javier.bu...@metempsy.com>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Javier Bueno Hedo <javier.bu...@metempsy.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev