changeset c03e683e83fe in /z/repo/m5 details: http://repo.m5sim.org/m5?cmd=changeset;node=c03e683e83fe description: sim: add some DPRINTFs for debugging unserialization Also got rid of unused C++ unserializeAll() method (this is now handled in Python)
diffstat: src/sim/sim_object.cc | 27 ++++++--------------------- src/sim/sim_object.hh | 1 - 2 files changed, 6 insertions(+), 22 deletions(-) diffs (63 lines): diff -r 6a49ac49fd67 -r c03e683e83fe src/sim/sim_object.cc --- a/src/sim/sim_object.cc Mon May 23 14:27:20 2011 -0700 +++ b/src/sim/sim_object.cc Mon May 23 14:27:20 2011 -0700 @@ -38,7 +38,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "base/types.hh" -#include "debug/Config.hh" +#include "debug/Checkpoint.hh" #include "sim/sim_object.hh" #include "sim/stats.hh" @@ -78,8 +78,12 @@ void SimObject::loadState(Checkpoint *cp) { - if (cp->sectionExists(name())) + if (cp->sectionExists(name())) { + DPRINTF(Checkpoint, "unserializing\n"); unserialize(cp, name()); + } else { + DPRINTF(Checkpoint, "no checkpoint section found\n"); + } } void @@ -126,25 +130,6 @@ } } -void -SimObject::unserializeAll(Checkpoint *cp) -{ - SimObjectList::reverse_iterator ri = simObjectList.rbegin(); - SimObjectList::reverse_iterator rend = simObjectList.rend(); - - for (; ri != rend; ++ri) { - SimObject *obj = *ri; - DPRINTFR(Config, "Unserializing '%s'\n", - obj->name()); - if(cp->sectionExists(obj->name())) - obj->unserialize(cp, obj->name()); - else - warn("Not unserializing '%s': no section found in checkpoint.\n", - obj->name()); - } -} - - #ifdef DEBUG // diff -r 6a49ac49fd67 -r c03e683e83fe src/sim/sim_object.hh --- a/src/sim/sim_object.hh Mon May 23 14:27:20 2011 -0700 +++ b/src/sim/sim_object.hh Mon May 23 14:27:20 2011 -0700 @@ -138,7 +138,6 @@ // static: call nameOut() & serialize() on all SimObjects static void serializeAll(std::ostream &); - static void unserializeAll(Checkpoint *cp); // Methods to drain objects in order to take checkpoints // Or switch from timing -> atomic memory model _______________________________________________ gem5-dev mailing list gem5-dev@m5sim.org http://m5sim.org/mailman/listinfo/gem5-dev