mem-cache: ISB prefetcher was triggering an assertion
authorJavier Bueno <javier.bueno@metempsy.com>
Tue, 2 Apr 2019 21:43:28 +0000 (23:43 +0200)
committerJavier Bueno Hedo <javier.bueno@metempsy.com>
Wed, 3 Apr 2019 09:14:22 +0000 (09:14 +0000)
An assertion ignored the case when an entry of the SP table had been invalidated.

Change-Id: I5bf04e7a0979300b0f41f680c371f6397d4cbf3f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17734
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

src/mem/cache/prefetch/irregular_stream_buffer.cc

index 45aba0b3296582e8c42f3e082d6e343272f1b917..345fe70601aecd118cfb80a2fc40345cdca9d8fc 100644 (file)
@@ -147,7 +147,10 @@ IrregularStreamBufferPrefetcher::calculatePrefetch(const PrefetchInfo &pfi,
             Addr sp_index   = mapping.address % prefetchCandidatesPerEntry;
             AddressMappingEntry *sp_am =
                 spAddressMappingCache.findEntry(sp_address, is_secure);
-            assert(sp_am != nullptr);
+            if (sp_am == nullptr) {
+                // The entry has been evicted, can not generate prefetches
+                return;
+            }
             for (unsigned d = 1;
                     d <= degree && (sp_index + d) < prefetchCandidatesPerEntry;
                     d += 1)