diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-08-17 05:08:50 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-08-17 05:08:50 -0700 |
commit | 5ea906ba1625266ee80968d70e0c218adedcce9f (patch) | |
tree | a28387572527f0dac40d677a8320b797dcc2a137 /src/sim/sim_object.cc | |
parent | c2cce96a0bb4878a9e6a4ae635096b5ce62e41c3 (diff) | |
download | gem5-5ea906ba1625266ee80968d70e0c218adedcce9f.tar.xz |
sim: move iterating over SimObjects into Python.
Diffstat (limited to 'src/sim/sim_object.cc')
-rw-r--r-- | src/sim/sim_object.cc | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc index 0b18ff437..157bf1395 100644 --- a/src/sim/sim_object.cc +++ b/src/sim/sim_object.cc @@ -97,76 +97,6 @@ SimObject::resetStats() } // -// static function: -// call regStats() on all SimObjects and then regFormulas() on all -// SimObjects. -// -struct SimObjectResetCB : public Callback -{ - virtual void process() { SimObject::resetAllStats(); } -}; - -namespace { - static SimObjectResetCB StatResetCB; -} - -void -SimObject::regAllStats() -{ - SimObjectList::iterator i; - SimObjectList::iterator end = simObjectList.end(); - - /** - * @todo change cprintfs to DPRINTFs - */ - for (i = simObjectList.begin(); i != end; ++i) { -#ifdef STAT_DEBUG - cprintf("registering stats for %s\n", (*i)->name()); -#endif - (*i)->regStats(); - } - - for (i = simObjectList.begin(); i != end; ++i) { -#ifdef STAT_DEBUG - cprintf("registering formulas for %s\n", (*i)->name()); -#endif - (*i)->regFormulas(); - } - - Stats::registerResetCallback(&StatResetCB); -} - -// -// static function: call init() on all SimObjects. -// -void -SimObject::initAll() -{ - SimObjectList::iterator i = simObjectList.begin(); - SimObjectList::iterator end = simObjectList.end(); - - for (; i != end; ++i) { - SimObject *obj = *i; - obj->init(); - } -} - -// -// static function: call resetStats() on all SimObjects. -// -void -SimObject::resetAllStats() -{ - SimObjectList::iterator i = simObjectList.begin(); - SimObjectList::iterator end = simObjectList.end(); - - for (; i != end; ++i) { - SimObject *obj = *i; - obj->resetStats(); - } -} - -// // static function: serialize all SimObjects. // void @@ -201,18 +131,6 @@ SimObject::unserializeAll(Checkpoint *cp) } -void -SimObject::startupAll() -{ - SimObjectList::iterator i = simObjectList.begin(); - SimObjectList::iterator end = simObjectList.end(); - - while (i != end) { - (*i)->startup(); - ++i; - } -} - #ifdef DEBUG // |