From 62d756f253f8ced44d8a054fa229da4b3cce896a Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 21 May 2004 13:39:20 -0400 Subject: rename namespace Statistics to Stats --HG-- extra : convert_revision : 28f1703f8d7d8cf33fb952ae450f66bdba860fb7 --- sim/main.cc | 10 +++++----- sim/process.cc | 2 +- sim/process.hh | 2 +- sim/sim_object.cc | 2 +- sim/stat_control.cc | 26 +++++++++++++------------- sim/stat_control.hh | 4 ++-- sim/stats.hh | 4 ++-- sim/system.cc | 12 ++++++------ sim/system.hh | 10 +++++----- 9 files changed, 36 insertions(+), 36 deletions(-) (limited to 'sim') 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 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 5602a89a2..96c0b197e 100644 --- a/sim/sim_object.cc +++ b/sim/sim_object.cc @@ -121,7 +121,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 #include -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_iterator i; + std::map::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 08fcfb784..f9909019b 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -51,18 +51,18 @@ class System : public SimObject { // lisa's binning stuff private: - std::map fnBins; + std::map fnBins; std::map swCtxMap; protected: std::vector 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); -- cgit v1.2.3