stats: rename StatEvent() function to schedStatEvent().

This follows the style rules and is more descriptive.
This commit is contained in:
Steve Reinhardt 2011-01-07 21:50:29 -08:00
parent 94807214c4
commit c22be9f2f0
6 changed files with 15 additions and 13 deletions

View file

@ -28,7 +28,7 @@
import internal
from internal.stats import StatEvent as event
from internal.stats import schedStatEvent as schedEvent
from objects import Root
def initText(filename, desc=True):

View file

@ -50,7 +50,8 @@ void initMySQL(std::string host, std::string database, std::string user,
std::string passwd, std::string project, std::string name,
std::string sample);
void StatEvent(bool dump, bool reset, Tick when = curTick, Tick repeat = 0);
void schedStatEvent(bool dump, bool reset,
Tick when = curTick, Tick repeat = 0);
void enable();
void prepare();

View file

@ -236,7 +236,7 @@ resetstats(ThreadContext *tc, Tick delay, Tick period)
Tick when = curTick + delay * SimClock::Int::ns;
Tick repeat = period * SimClock::Int::ns;
Stats::StatEvent(false, true, when, repeat);
Stats::schedStatEvent(false, true, when, repeat);
}
void
@ -249,7 +249,7 @@ dumpstats(ThreadContext *tc, Tick delay, Tick period)
Tick when = curTick + delay * SimClock::Int::ns;
Tick repeat = period * SimClock::Int::ns;
Stats::StatEvent(true, false, when, repeat);
Stats::schedStatEvent(true, false, when, repeat);
}
void
@ -262,7 +262,7 @@ dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
Tick when = curTick + delay * SimClock::Int::ns;
Tick repeat = period * SimClock::Int::ns;
Stats::StatEvent(true, true, when, repeat);
Stats::schedStatEvent(true, true, when, repeat);
}
void

View file

@ -93,7 +93,7 @@ simulate(Tick num_cycles)
if (async_event) {
async_event = false;
if (async_statdump || async_statreset) {
Stats::StatEvent(async_statdump, async_statreset);
Stats::schedStatEvent(async_statdump, async_statreset);
async_statdump = false;
async_statreset = false;
}

View file

@ -48,6 +48,7 @@
#endif
#include "sim/eventq.hh"
#include "sim/stat_control.hh"
using namespace std;
@ -164,7 +165,7 @@ initSimStats()
static Global global;
}
class _StatEvent : public Event
class StatEvent : public Event
{
private:
bool dump;
@ -172,7 +173,7 @@ class _StatEvent : public Event
Tick repeat;
public:
_StatEvent(bool _dump, bool _reset, Tick _repeat)
StatEvent(bool _dump, bool _reset, Tick _repeat)
: Event(Stat_Event_Pri), dump(_dump), reset(_reset), repeat(_repeat)
{
setFlags(AutoDelete);
@ -188,16 +189,15 @@ class _StatEvent : public Event
Stats::reset();
if (repeat) {
Event *event = new _StatEvent(dump, reset, repeat);
mainEventQueue.schedule(event, curTick + repeat);
Stats::schedStatEvent(dump, reset, curTick + repeat, repeat);
}
}
};
void
StatEvent(bool dump, bool reset, Tick when, Tick repeat)
schedStatEvent(bool dump, bool reset, Tick when, Tick repeat)
{
Event *event = new _StatEvent(dump, reset, repeat);
Event *event = new StatEvent(dump, reset, repeat);
mainEventQueue.schedule(event, when);
}

View file

@ -34,7 +34,8 @@
namespace Stats {
void initSimStats();
void StatEvent(bool dump, bool reset, Tick when = curTick, Tick repeat = 0);
void schedStatEvent(bool dump, bool reset, Tick when = curTick,
Tick repeat = 0);
} // namespace Stats