summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-09-06 22:37:35 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2006-09-06 22:37:35 -0700
commitc15e6d8e0a061b82738c4d1d03bae4470d432731 (patch)
tree336a0ddbbbf5b6777e00a39e8ca93603e460fb42 /src
parent54698f6be86042162c47f4c75a501065c8fbae83 (diff)
downloadgem5-c15e6d8e0a061b82738c4d1d03bae4470d432731.tar.xz
Try to make unproxy order more deterministic.
--HG-- extra : convert_revision : 0bc543014dced6dfed4122d4c1b8f22e6c8d7a13
Diffstat (limited to 'src')
-rw-r--r--src/python/m5/SimObject.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py
index 281352e0d..a0d66e643 100644
--- a/src/python/m5/SimObject.py
+++ b/src/python/m5/SimObject.py
@@ -633,13 +633,20 @@ class SimObject(object):
raise
setattr(self, param, value)
- for port_name in self._ports.iterkeys():
+ # Unproxy ports in sorted order so that 'append' operations on
+ # vector ports are done in a deterministic fashion.
+ port_names = self._ports.keys()
+ port_names.sort()
+ for port_name in port_names:
port = self._port_refs.get(port_name)
if port != None:
port.unproxy(self)
- for child in self._children.itervalues():
- child.unproxy_all()
+ # Unproxy children in sorted order for determinism also.
+ child_names = self._children.keys()
+ child_names.sort()
+ for child in child_names:
+ self._children[child].unproxy_all()
def print_ini(self):
print '[' + self.path() + ']' # .ini section header