From c9634d9b38e5d58a8b68af5f26c257886d791518 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 12 Apr 2012 08:35:49 -0400 Subject: Ruby: Ensure order-dependent iteration uses an ordered map This patch fixes a bug in Ruby that caused non-deterministic simulation when changing the underlying hash map implementation. The reason is order-dependent behaviour in combination with iteration over the hash map contents. The two locations where a sorted container is assumed are now changed to make use of a std::map instead of the unordered hash map. With this change, the stats changes slightly and the follow-on changeset will update the relevant statistics. --- src/mem/slicc/symbols/StateMachine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mem/slicc') diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py index 7d863e349..a9886b229 100644 --- a/src/mem/slicc/symbols/StateMachine.py +++ b/src/mem/slicc/symbols/StateMachine.py @@ -324,7 +324,7 @@ MachineID m_machineID; bool m_is_blocking; std::map m_block_map; typedef std::vector MsgVecType; -typedef m5::hash_map< Address, MsgVecType* > WaitingBufType; +typedef std::map< Address, MsgVecType* > WaitingBufType; WaitingBufType m_waiting_buffers; int m_max_in_port_rank; int m_cur_in_port_rank; -- cgit v1.2.3