Ok, actually call resetStats on all stats
minor gratuitous cleanup in printAllExtraOutput.
(only create one end iterator)
Fix average stats reset
base/statistics.hh:
Shouldn't reset average stats this way. The current stat value
should stay the same.
sim/sim_object.cc:
Ok, actually call resetStats on all stats
minor gratuitous cleanup in printAllExtraOutput.
(only create one end iterator)
--HG--
extra : convert_revision : 13090ebe490a93757b8eb7d7c6a9697983095e41
This commit is contained in:
@@ -528,7 +528,6 @@ struct AvgStor
|
||||
*/
|
||||
void reset()
|
||||
{
|
||||
current = T();
|
||||
total = 0;
|
||||
last = curTick;
|
||||
}
|
||||
|
||||
@@ -131,6 +131,13 @@ SimObject::regAllStats()
|
||||
void
|
||||
SimObject::resetAllStats()
|
||||
{
|
||||
SimObjectList::iterator i = simObjectList.begin();
|
||||
SimObjectList::iterator end = simObjectList.end();
|
||||
|
||||
for (; i != end; ++i) {
|
||||
SimObject *obj = *i;
|
||||
obj->resetStats();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -139,9 +146,11 @@ SimObject::resetAllStats()
|
||||
void
|
||||
SimObject::printAllExtraOutput(ostream &os)
|
||||
{
|
||||
SimObjectList::iterator i;
|
||||
SimObjectList::iterator i = simObjectList.begin();
|
||||
SimObjectList::iterator end = simObjectList.end();
|
||||
|
||||
for (i = simObjectList.begin(); i != simObjectList.end(); ++i) {
|
||||
(*i)->printExtraOutput(os);
|
||||
for (; i != end; ++i) {
|
||||
SimObject *obj = *i;
|
||||
obj->printExtraOutput(os);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user