Change subject: mem-cache: queued prefetcher bug fix ...................................................................... mem-cache: queued prefetcher bug fix In queued prefetcher, addToQueue function doesn't behave correctly where the element must be added to the end of queue. I fixed this bug. Change-Id: I1eec129f827b6465e7cef874c551d96acbf18d5b Signed-off-by: Burak Öçalan <[email protected]> Reported-by: Burak Öçalan <[email protected]> Tested-by: Burak Öçalan <[email protected]> --- M src/mem/cache/prefetch/queued.cc 1 file changed, 7 insertions(+), 0 deletions(-)diff --git a/src/mem/cache/prefetch/queued.cc b/src/mem/cache/prefetch/queued.cc
index 2a74a17..221542a 100644
--- a/src/mem/cache/prefetch/queued.cc
+++ b/src/mem/cache/prefetch/queued.cc
@@ -475,6 +475,13 @@
if (queue.size() == 0) {
queue.emplace_back(dpp);
} else {
+ /* Handle the case where the element should be added to end of
queue
+ separately */
+ if (dpp <= queue.back()) {
+ queue.insert(queue.end(), dpp);
+ return;
+ }
+
iterator it = queue.end();
do {
--it;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46759
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I1eec129f827b6465e7cef874c551d96acbf18d5b Gerrit-Change-Number: 46759 Gerrit-PatchSet: 1 Gerrit-Owner: Burak Öçalan <[email protected]> Gerrit-MessageType: newchange
_______________________________________________ gem5-dev mailing list -- [email protected] To unsubscribe send an email to [email protected] %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
