rename namespace Statistics to Stats
--HG-- extra : convert_revision : 28f1703f8d7d8cf33fb952ae450f66bdba860fb7
This commit is contained in:
10
sim/main.cc
10
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -121,7 +121,7 @@ SimObject::regAllStats()
|
||||
(*i)->regFormulas();
|
||||
}
|
||||
|
||||
Statistics::registerResetCallback(&StatResetCB);
|
||||
Stats::registerResetCallback(&StatResetCB);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -51,18 +51,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);
|
||||
|
||||
Reference in New Issue
Block a user