summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-05-21 13:03:17 -0400
committerNathan Binkert <binkertn@umich.edu>2004-05-21 13:03:17 -0400
commitb4405682d9f0d7bd01ff461a7e457f8dbbfff1a0 (patch)
tree95047a24c7b3a0be93afb2a723f13abd07666745 /sim
parent47604c8c89539df9aa27b7ba5c4523f27a8ec243 (diff)
downloadgem5-b4405682d9f0d7bd01ff461a7e457f8dbbfff1a0.tar.xz
Change the namespace Statistics to Stats
--HG-- extra : convert_revision : 3084b292bbe2e8a392af8e99a31763ca0b0a9467
Diffstat (limited to 'sim')
-rw-r--r--sim/main.cc10
-rw-r--r--sim/process.cc2
-rw-r--r--sim/process.hh2
-rw-r--r--sim/sim_object.cc2
-rw-r--r--sim/stat_control.cc26
-rw-r--r--sim/stat_control.hh4
-rw-r--r--sim/stats.hh4
-rw-r--r--sim/system.cc12
-rw-r--r--sim/system.hh10
9 files changed, 36 insertions, 36 deletions
diff --git a/sim/main.cc b/sim/main.cc
index 8861f3ef0..032a05668 100644
--- a/sim/main.cc
+++ b/sim/main.cc
@@ -236,7 +236,7 @@ main(int argc, char **argv)
sayHello(cerr);
// Initialize statistics database
- Statistics::InitSimStats();
+ Stats::InitSimStats();
vector<char *> cppArgs;
@@ -390,10 +390,10 @@ main(int argc, char **argv)
#endif
// Check to make sure that the stats package is properly initialized
- Statistics::check();
+ Stats::check();
// Reset to put the stats in a consistent state.
- Statistics::reset();
+ Stats::reset();
// Nothing to simulate if we don't have at least one CPU somewhere.
if (BaseCPU::numSimulatedCPUs() == 0) {
@@ -418,14 +418,14 @@ main(int argc, char **argv)
if (async_dump) {
async_dump = false;
- using namespace Statistics;
+ using namespace Stats;
SetupEvent(Dump, curTick);
}
if (async_dumpreset) {
async_dumpreset = false;
- using namespace Statistics;
+ using namespace Stats;
SetupEvent(Dump | Reset, curTick);
}
diff --git a/sim/process.cc b/sim/process.cc
index c6b497343..65cb8409f 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -95,7 +95,7 @@ Process::Process(const string &name,
void
Process::regStats()
{
- using namespace Statistics;
+ using namespace Stats;
num_syscalls
.name(name() + ".PROG:num_syscalls")
diff --git a/sim/process.hh b/sim/process.hh
index b23302b8f..d235f0ef1 100644
--- a/sim/process.hh
+++ b/sim/process.hh
@@ -98,7 +98,7 @@ class Process : public SimObject
std::string prog_fname; // file name
Addr prog_entry; // entry point (initial PC)
- Statistics::Scalar<> num_syscalls; // number of syscalls executed
+ Stats::Scalar<> num_syscalls; // number of syscalls executed
protected:
diff --git a/sim/sim_object.cc b/sim/sim_object.cc
index 9626c54ea..7f756858c 100644
--- a/sim/sim_object.cc
+++ b/sim/sim_object.cc
@@ -120,7 +120,7 @@ SimObject::regAllStats()
(*i)->regFormulas();
}
- Statistics::registerResetCallback(&StatResetCB);
+ Stats::registerResetCallback(&StatResetCB);
}
//
diff --git a/sim/stat_control.cc b/sim/stat_control.cc
index c7d2fdd5b..28ee348b5 100644
--- a/sim/stat_control.cc
+++ b/sim/stat_control.cc
@@ -47,17 +47,17 @@
using namespace std;
-Statistics::Formula hostInstRate;
-Statistics::Formula hostTickRate;
-Statistics::Value hostMemory;
-Statistics::Value hostSeconds;
+Stats::Formula hostInstRate;
+Stats::Formula hostTickRate;
+Stats::Value hostMemory;
+Stats::Value hostSeconds;
-Statistics::Value simTicks;
-Statistics::Value simInsts;
-Statistics::Value simFreq;
-Statistics::Formula simSeconds;
+Stats::Value simTicks;
+Stats::Value simInsts;
+Stats::Value simFreq;
+Stats::Formula simSeconds;
-namespace Statistics {
+namespace Stats {
Time statTime(true);
Tick startTick;
@@ -173,10 +173,10 @@ StatEvent::description()
void
StatEvent::process()
{
- if (flags & Statistics::Dump)
+ if (flags & Stats::Dump)
DumpNow();
- if (flags & Statistics::Reset)
+ if (flags & Stats::Reset)
reset();
if (repeat)
@@ -205,11 +205,11 @@ SetupEvent(int flags, Tick when, Tick repeat)
new StatEvent(flags, when, repeat);
}
-/* namespace Statistics */ }
+/* namespace Stats */ }
extern "C" void
debugDumpStats()
{
- Statistics::DumpNow();
+ Stats::DumpNow();
}
diff --git a/sim/stat_control.hh b/sim/stat_control.hh
index 9a5e269e1..56170dc77 100644
--- a/sim/stat_control.hh
+++ b/sim/stat_control.hh
@@ -32,7 +32,7 @@
#include <fstream>
#include <list>
-namespace Statistics {
+namespace Stats {
enum {
Reset = 0x1,
@@ -47,6 +47,6 @@ void SetupEvent(int flags, Tick when, Tick repeat = 0);
void InitSimStats();
-/* namespace Statistics */ }
+/* namespace Stats */ }
#endif // __SIM_STAT_CONTROL_HH__
diff --git a/sim/stats.hh b/sim/stats.hh
index c5e791cfb..218036eb6 100644
--- a/sim/stats.hh
+++ b/sim/stats.hh
@@ -31,7 +31,7 @@
#include "base/statistics.hh"
-extern Statistics::Formula simSeconds;
-extern Statistics::Value simTicks;
+extern Stats::Formula simSeconds;
+extern Stats::Value simTicks;
#endif // __SIM_SIM_STATS_HH__
diff --git a/sim/system.cc b/sim/system.cc
index 791a092ac..619593abd 100644
--- a/sim/system.cc
+++ b/sim/system.cc
@@ -55,19 +55,19 @@ System::System(const std::string _name,
// add self to global system list
systemList.push_back(this);
if (bin == true) {
- Kernel = new Statistics::MainBin("non TCPIP Kernel stats");
+ Kernel = new Stats::MainBin("non TCPIP Kernel stats");
Kernel->activate();
- User = new Statistics::MainBin("User stats");
+ User = new Stats::MainBin("User stats");
int end = binned_fns.size();
assert(!(end & 1));
- Statistics::MainBin *Bin;
+ Stats::MainBin *Bin;
fnEvents.resize(end>>1);
for (int i = 0; i < end; i +=2) {
- Bin = new Statistics::MainBin(binned_fns[i]);
+ Bin = new Stats::MainBin(binned_fns[i]);
fnBins.insert(make_pair(binned_fns[i], Bin));
fnEvents[(i>>1)] = new FnEvent(&pcEventQueue, binned_fns[i], this);
@@ -178,10 +178,10 @@ System::dumpState(ExecContext *xc) const
}
}
-Statistics::MainBin *
+Stats::MainBin *
System::getBin(const std::string &name)
{
- std::map<const std::string, Statistics::MainBin *>::const_iterator i;
+ std::map<const std::string, Stats::MainBin *>::const_iterator i;
i = fnBins.find(name);
if (i == fnBins.end())
panic("trying to getBin %s that is not on system map!", name);
diff --git a/sim/system.hh b/sim/system.hh
index 564579fe4..b83945884 100644
--- a/sim/system.hh
+++ b/sim/system.hh
@@ -50,18 +50,18 @@ class System : public SimObject
{
// lisa's binning stuff
private:
- std::map<const std::string, Statistics::MainBin *> fnBins;
+ std::map<const std::string, Stats::MainBin *> fnBins;
std::map<const Addr, SWContext *> swCtxMap;
protected:
std::vector<FnEvent *> fnEvents;
public:
- Statistics::Scalar<> fnCalls;
- Statistics::MainBin *Kernel;
- Statistics::MainBin *User;
+ Stats::Scalar<> fnCalls;
+ Stats::MainBin *Kernel;
+ Stats::MainBin *User;
- Statistics::MainBin * getBin(const std::string &name);
+ Stats::MainBin * getBin(const std::string &name);
bool findCaller(std::string, std::string) const;
SWContext *findContext(Addr pcb);