This follows the style rules and is more descriptive.
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):
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();
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
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
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
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;
}
#endif
#include "sim/eventq.hh"
+#include "sim/stat_control.hh"
using namespace std;
static Global global;
}
-class _StatEvent : public Event
+class StatEvent : public Event
{
private:
bool dump;
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);
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);
}
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