summaryrefslogtreecommitdiff
path: root/src/mem/cache
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2017-02-19 05:30:31 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2017-02-19 05:30:31 -0500
commit184c6d7ebd7faa0869f294526a54a239a216b7c8 (patch)
tree136ca9e844392f986649f571c43393ef77a687ca /src/mem/cache
parent912b20d02a4ec12b076e675ff150e3f1e89febaa (diff)
downloadgem5-184c6d7ebd7faa0869f294526a54a239a216b7c8.tar.xz
sim: Ensure draining is deterministic
The traversal of drainable objects could potentially be non-deterministic when using an unordered set containing object pointers. To ensure that the iteration is deterministic, we switch to a vector. Note that the lookup and traversal of the drainable objects is not performance critical, so the change has no negative consequences.
Diffstat (limited to 'src/mem/cache')
-rw-r--r--src/mem/cache/cache.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mem/cache/cache.hh b/src/mem/cache/cache.hh
index 4f9142f7c..7f9130d62 100644
--- a/src/mem/cache/cache.hh
+++ b/src/mem/cache/cache.hh
@@ -52,6 +52,8 @@
#ifndef __MEM_CACHE_CACHE_HH__
#define __MEM_CACHE_CACHE_HH__
+#include <unordered_set>
+
#include "base/misc.hh" // fatal, panic, and warn
#include "enums/Clusivity.hh"
#include "mem/cache/base.hh"