summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2011-01-07 21:50:29 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2011-01-07 21:50:29 -0800
commitc22be9f2f016872b05d65c82055ddc936b4aa075 (patch)
treea261c6044632eab6cd472869932a9ddfb4e425c1
parent94807214c417f3124e2824597c2867f91c1017b3 (diff)
downloadgem5-c22be9f2f016872b05d65c82055ddc936b4aa075.tar.xz
stats: rename StatEvent() function to schedStatEvent().
This follows the style rules and is more descriptive.
-rw-r--r--src/python/m5/stats.py2
-rw-r--r--src/python/swig/stats.i3
-rw-r--r--src/sim/pseudo_inst.cc6
-rw-r--r--src/sim/simulate.cc2
-rw-r--r--src/sim/stat_control.cc12
-rw-r--r--src/sim/stat_control.hh3
6 files changed, 15 insertions, 13 deletions
diff --git a/src/python/m5/stats.py b/src/python/m5/stats.py
index 907fad531..24072aeb0 100644
--- a/src/python/m5/stats.py
+++ b/src/python/m5/stats.py
@@ -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):
diff --git a/src/python/swig/stats.i b/src/python/swig/stats.i
index eaa4c31c8..67ce72173 100644
--- a/src/python/swig/stats.i
+++ b/src/python/swig/stats.i
@@ -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();
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index 49298c6a9..df6ba1781 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -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
diff --git a/src/sim/simulate.cc b/src/sim/simulate.cc
index 0cc603d3f..de33cce1c 100644
--- a/src/sim/simulate.cc
+++ b/src/sim/simulate.cc
@@ -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;
}
diff --git a/src/sim/stat_control.cc b/src/sim/stat_control.cc
index 83861c185..5985eb0a4 100644
--- a/src/sim/stat_control.cc
+++ b/src/sim/stat_control.cc
@@ -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);
}
diff --git a/src/sim/stat_control.hh b/src/sim/stat_control.hh
index 78031b666..ac3c44960 100644
--- a/src/sim/stat_control.hh
+++ b/src/sim/stat_control.hh
@@ -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