changeset 933cc91f63e1 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=933cc91f63e1
description:
        cpu: Fix o3 SMT IQCount bug

        Commmitted by: Nilay Vaish <[email protected]>

diffstat:

 src/cpu/o3/fetch_impl.hh |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (43 lines):

diff -r f4ff359c61ff -r 933cc91f63e1 src/cpu/o3/fetch_impl.hh
--- a/src/cpu/o3/fetch_impl.hh  Sat Oct 11 16:16:00 2014 -0500
+++ b/src/cpu/o3/fetch_impl.hh  Sat Oct 11 16:16:02 2014 -0500
@@ -1511,7 +1511,9 @@
 ThreadID
 DefaultFetch<Impl>::iqCount()
 {
-    std::priority_queue<unsigned> PQ;
+    //sorted from lowest->highest
+    std::priority_queue<unsigned,vector<unsigned>,
+                        std::greater<unsigned> > PQ;
     std::map<unsigned, ThreadID> threadMap;
 
     list<ThreadID>::iterator threads = activeThreads->begin();
@@ -1521,6 +1523,8 @@
         ThreadID tid = *threads++;
         unsigned iqCount = fromIEW->iewInfo[tid].iqCount;
 
+        //we can potentially get tid collisions if two threads
+        //have the same iqCount, but this should be rare.
         PQ.push(iqCount);
         threadMap[iqCount] = tid;
     }
@@ -1544,7 +1548,9 @@
 ThreadID
 DefaultFetch<Impl>::lsqCount()
 {
-    std::priority_queue<unsigned> PQ;
+    //sorted from lowest->highest
+    std::priority_queue<unsigned,vector<unsigned>,
+                        std::greater<unsigned> > PQ;
     std::map<unsigned, ThreadID> threadMap;
 
     list<ThreadID>::iterator threads = activeThreads->begin();
@@ -1554,6 +1560,8 @@
         ThreadID tid = *threads++;
         unsigned ldstqCount = fromIEW->iewInfo[tid].ldstqCount;
 
+        //we can potentially get tid collisions if two threads
+        //have the same iqCount, but this should be rare.
         PQ.push(ldstqCount);
         threadMap[ldstqCount] = tid;
     }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to