From 184c6d7ebd7faa0869f294526a54a239a216b7c8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Sun, 19 Feb 2017 05:30:31 -0500 Subject: 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. --- src/mem/cache/cache.hh | 2 ++ src/mem/coherent_xbar.hh | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/mem') 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 + #include "base/misc.hh" // fatal, panic, and warn #include "enums/Clusivity.hh" #include "mem/cache/base.hh" diff --git a/src/mem/coherent_xbar.hh b/src/mem/coherent_xbar.hh index 0f641664d..edfc47d4b 100644 --- a/src/mem/coherent_xbar.hh +++ b/src/mem/coherent_xbar.hh @@ -51,6 +51,8 @@ #ifndef __MEM_COHERENT_XBAR_HH__ #define __MEM_COHERENT_XBAR_HH__ +#include + #include "mem/snoop_filter.hh" #include "mem/xbar.hh" #include "params/CoherentXBar.hh" -- cgit v1.2.3