diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-05-23 14:27:20 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-05-23 14:27:20 -0700 |
commit | ccbecb9e8f35df55c3a138942eb37aecce899440 (patch) | |
tree | abcab89cf691fb46d3fcec36dde846c5862dfe97 /src/sim/sim_object.cc | |
parent | 7411f348d57b62461145cba3917ec614f7936c4c (diff) | |
download | gem5-ccbecb9e8f35df55c3a138942eb37aecce899440.tar.xz |
sim: add some DPRINTFs for debugging unserialization
Also got rid of unused C++ unserializeAll() method
(this is now handled in Python)
Diffstat (limited to 'src/sim/sim_object.cc')
-rw-r--r-- | src/sim/sim_object.cc | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc index 8919f3e72..9ac0b7fff 100644 --- a/src/sim/sim_object.cc +++ b/src/sim/sim_object.cc @@ -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 @@ SimObject::init() 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 @@ SimObject::serializeAll(ostream &os) } } -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 // |