mem: Use unordered set in bus request tracking
authorAndreas Hansson <andreas.hansson@arm.com>
Thu, 30 May 2013 16:53:57 +0000 (12:53 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Thu, 30 May 2013 16:53:57 +0000 (12:53 -0400)
This patch changes the set used to track outstanding requests to an
unordered set (part of C++11 STL). There is no need to maintain the
order, and hopefully there might even be a small performance benefit.

src/mem/bus.hh
src/mem/coherent_bus.hh

index 16345537a78ae6617d447401abc36218ec76f840..7492cf62248785bd5eaf07d33563474ff3613a51 100644 (file)
@@ -52,7 +52,6 @@
 #define __MEM_BUS_HH__
 
 #include <deque>
-#include <set>
 
 #include "base/addr_range_map.hh"
 #include "base/types.hh"
index 203d7f6b35595d52909d3605971d26f439d71e42..837cc23d8605c35fabdac70447d785b48d0a2135 100644 (file)
@@ -51,6 +51,7 @@
 #ifndef __MEM_COHERENT_BUS_HH__
 #define __MEM_COHERENT_BUS_HH__
 
+#include "base/hashmap.hh"
 #include "mem/bus.hh"
 #include "params/CoherentBus.hh"
 
@@ -222,7 +223,7 @@ class CoherentBus : public BaseBus
      * we generated and which ones were merely forwarded. This is used
      * in the coherent bus when coherency responses come back.
      */
-    std::set<RequestPtr> outstandingReq;
+    m5::hash_set<RequestPtr> outstandingReq;
 
     /**
      * Keep a pointer to the system to be allow to querying memory system