changeset 8caffc398ae7 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=8caffc398ae7
description:
        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 <[email protected]>

diffstat:

 src/sim/cxx_manager.cc |  7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diffs (17 lines):

diff -r c6a6fed4bf6c -r 8caffc398ae7 src/sim/cxx_manager.cc
--- a/src/sim/cxx_manager.cc    Thu Feb 09 19:10:25 2017 -0500
+++ b/src/sim/cxx_manager.cc    Thu Feb 09 19:11:23 2017 -0500
@@ -415,13 +415,6 @@
     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");
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to