summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Menard <Christian.Menard@tu-dresden.de>2017-02-09 19:11:23 -0500
committerChristian Menard <Christian.Menard@tu-dresden.de>2017-02-09 19:11:23 -0500
commit5fd959260cbcc35f1f5187321f5c473f04647bf6 (patch)
tree7333743f59b71f5611c6deb038ebb6cdce319c79
parentf4b14c73fc1c07b2c4658b4275ad121a6b6346d8 (diff)
downloadgem5-5fd959260cbcc35f1f5187321f5c473f04647bf6.tar.xz
misc: Fix order of object construction in the CxxConfigManager
The CxxConfigManager schould create objects by traversing the object tree starting from the root object. However, currently objects are created in aplphabetical order, which only works if the root object alphabetically comes before any system object (e.g. 'root' < 'system'. Otherwise (e.g. 'a_system' < 'root'), object construction may fail. The reason for this behaviour is, that the call to findObject() in the sorting code also constructs the object if it is not yet existent. Then findTraversalOrder() calls findObject("root") and subseqeuently calls findObject() on all the children, and so on. However, the call to findTraversalOrder() is redundant, since all objects are already created in alphabetical order. This patch simply removes the alphabetical ordering, leading to the objects being created starting from 'root'. Reviewed at http://reviews.gem5.org/r/3778/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
-rw-r--r--src/sim/cxx_manager.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/sim/cxx_manager.cc b/src/sim/cxx_manager.cc
index bb6c6a807..915736127 100644
--- a/src/sim/cxx_manager.cc
+++ b/src/sim/cxx_manager.cc
@@ -415,13 +415,6 @@ CxxConfigManager::findAllObjects()
std::vector<std::string> objects;
configFile.getAllObjectNames(objects);
- /* Sort the object names to get a consistent initialisation order
- * even with config file reorganisation */
- std::sort(objects.begin(), objects.end());
-
- for (auto i = objects.begin(); i != objects.end(); ++i)
- findObject(*i);
-
/* Set the traversal order for further iterators */
objectsInOrder.clear();
findTraversalOrder("root");