rename namespace Statistics to Stats
--HG-- extra : convert_revision : 28f1703f8d7d8cf33fb952ae450f66bdba860fb7
This commit is contained in:
parent
f5c7b1358c
commit
62d756f253
39 changed files with 146 additions and 146 deletions
|
@ -80,10 +80,10 @@ class AlphaTLB : public SimObject
|
|||
class AlphaITB : public AlphaTLB
|
||||
{
|
||||
protected:
|
||||
mutable Statistics::Scalar<> hits;
|
||||
mutable Statistics::Scalar<> misses;
|
||||
mutable Statistics::Scalar<> acv;
|
||||
mutable Statistics::Formula accesses;
|
||||
mutable Stats::Scalar<> hits;
|
||||
mutable Stats::Scalar<> misses;
|
||||
mutable Stats::Scalar<> acv;
|
||||
mutable Stats::Formula accesses;
|
||||
|
||||
protected:
|
||||
void fault(Addr pc, ExecContext *xc) const;
|
||||
|
@ -98,18 +98,18 @@ class AlphaITB : public AlphaTLB
|
|||
class AlphaDTB : public AlphaTLB
|
||||
{
|
||||
protected:
|
||||
mutable Statistics::Scalar<> read_hits;
|
||||
mutable Statistics::Scalar<> read_misses;
|
||||
mutable Statistics::Scalar<> read_acv;
|
||||
mutable Statistics::Scalar<> read_accesses;
|
||||
mutable Statistics::Scalar<> write_hits;
|
||||
mutable Statistics::Scalar<> write_misses;
|
||||
mutable Statistics::Scalar<> write_acv;
|
||||
mutable Statistics::Scalar<> write_accesses;
|
||||
Statistics::Formula hits;
|
||||
Statistics::Formula misses;
|
||||
Statistics::Formula acv;
|
||||
Statistics::Formula accesses;
|
||||
mutable Stats::Scalar<> read_hits;
|
||||
mutable Stats::Scalar<> read_misses;
|
||||
mutable Stats::Scalar<> read_acv;
|
||||
mutable Stats::Scalar<> read_accesses;
|
||||
mutable Stats::Scalar<> write_hits;
|
||||
mutable Stats::Scalar<> write_misses;
|
||||
mutable Stats::Scalar<> write_acv;
|
||||
mutable Stats::Scalar<> write_accesses;
|
||||
Stats::Formula hits;
|
||||
Stats::Formula misses;
|
||||
Stats::Formula acv;
|
||||
Stats::Formula accesses;
|
||||
|
||||
protected:
|
||||
void fault(Addr pc, uint64_t flags, ExecContext *xc) const;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "sim/stats.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
|
||||
namespace AlphaPseudo
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ namespace AlphaPseudo
|
|||
Tick when = curTick + NS2Ticks(delay);
|
||||
Tick repeat = NS2Ticks(period);
|
||||
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
SetupEvent(Reset, when, repeat);
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ namespace AlphaPseudo
|
|||
Tick when = curTick + NS2Ticks(delay);
|
||||
Tick repeat = NS2Ticks(period);
|
||||
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
SetupEvent(Dump, when, repeat);
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ namespace AlphaPseudo
|
|||
Tick when = curTick + NS2Ticks(delay);
|
||||
Tick repeat = NS2Ticks(period);
|
||||
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
SetupEvent(Dump|Reset, when, repeat);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ HybridPredictor::HybridPredictor(const char *_p_name, const char *_z_name,
|
|||
|
||||
void HybridPredictor::regStats()
|
||||
{
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
|
||||
string p_name;
|
||||
stringstream description;
|
||||
|
@ -148,7 +148,7 @@ void HybridPredictor::regStats()
|
|||
|
||||
void HybridPredictor::regFormulas()
|
||||
{
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
|
||||
string p_name;
|
||||
stringstream description;
|
||||
|
|
|
@ -59,22 +59,22 @@ class HybridPredictor : public GenericPredictor
|
|||
//
|
||||
// Stats
|
||||
//
|
||||
Statistics::Scalar<> pred_one; //num_one_preds
|
||||
Statistics::Scalar<> pred_zero; //num_zero_preds
|
||||
Statistics::Scalar<> correct_pred_one; //num_one_correct
|
||||
Statistics::Scalar<> correct_pred_zero; //num_zero_correct
|
||||
Statistics::Scalar<> record_one; //num_one_updates
|
||||
Statistics::Scalar<> record_zero; //num_zero_updates
|
||||
Stats::Scalar<> pred_one; //num_one_preds
|
||||
Stats::Scalar<> pred_zero; //num_zero_preds
|
||||
Stats::Scalar<> correct_pred_one; //num_one_correct
|
||||
Stats::Scalar<> correct_pred_zero; //num_zero_correct
|
||||
Stats::Scalar<> record_one; //num_one_updates
|
||||
Stats::Scalar<> record_zero; //num_zero_updates
|
||||
|
||||
Statistics::Formula total_preds;
|
||||
Statistics::Formula frac_preds_zero;
|
||||
Statistics::Formula frac_preds_one;
|
||||
Statistics::Formula total_correct;
|
||||
Statistics::Formula total_accuracy;
|
||||
Statistics::Formula zero_accuracy;
|
||||
Statistics::Formula one_accuracy;
|
||||
Statistics::Formula zero_coverage;
|
||||
Statistics::Formula one_coverage;
|
||||
Stats::Formula total_preds;
|
||||
Stats::Formula frac_preds_zero;
|
||||
Stats::Formula frac_preds_one;
|
||||
Stats::Formula total_correct;
|
||||
Stats::Formula total_accuracy;
|
||||
Stats::Formula zero_accuracy;
|
||||
Stats::Formula one_accuracy;
|
||||
Stats::Formula zero_coverage;
|
||||
Stats::Formula one_coverage;
|
||||
|
||||
public:
|
||||
HybridPredictor(const char *_p_name, const char *_z_name,
|
||||
|
|
|
@ -69,7 +69,7 @@ SaturatingCounterPred::SaturatingCounterPred(string p_name,
|
|||
|
||||
void SaturatingCounterPred::regStats()
|
||||
{
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
stringstream name, description;
|
||||
|
||||
//
|
||||
|
@ -138,7 +138,7 @@ void SaturatingCounterPred::regStats()
|
|||
|
||||
void SaturatingCounterPred::regFormulas()
|
||||
{
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
stringstream name, description;
|
||||
|
||||
//
|
||||
|
|
|
@ -61,24 +61,24 @@ class SaturatingCounterPred : public GenericPredictor
|
|||
unsigned *table;
|
||||
|
||||
// Statistics
|
||||
Statistics::Scalar<> predicted_one; // Total predictions of one, preds_one
|
||||
Statistics::Scalar<> predicted_zero; // Total predictions of zero, preds_zero
|
||||
Statistics::Scalar<> correct_pred_one; // Total correct predictions of one, correct_one
|
||||
Statistics::Scalar<> correct_pred_zero; // Total correct predictions of zero, correct_zero
|
||||
Stats::Scalar<> predicted_one; // Total predictions of one, preds_one
|
||||
Stats::Scalar<> predicted_zero; // Total predictions of zero, preds_zero
|
||||
Stats::Scalar<> correct_pred_one; // Total correct predictions of one, correct_one
|
||||
Stats::Scalar<> correct_pred_zero; // Total correct predictions of zero, correct_zero
|
||||
|
||||
Statistics::Scalar<> record_zero; //updates_zero
|
||||
Statistics::Scalar<> record_one; //updates_one
|
||||
Stats::Scalar<> record_zero; //updates_zero
|
||||
Stats::Scalar<> record_one; //updates_one
|
||||
|
||||
Statistics::Formula preds_total;
|
||||
Statistics::Formula pred_frac_zero;
|
||||
Statistics::Formula pred_frac_one;
|
||||
Statistics::Formula correct_total;
|
||||
Statistics::Formula updates_total;
|
||||
Statistics::Formula pred_rate;
|
||||
Statistics::Formula frac_correct_zero;
|
||||
Statistics::Formula frac_correct_one;
|
||||
Statistics::Formula coverage_zero;
|
||||
Statistics::Formula coverage_one;
|
||||
Stats::Formula preds_total;
|
||||
Stats::Formula pred_frac_zero;
|
||||
Stats::Formula pred_frac_one;
|
||||
Stats::Formula correct_total;
|
||||
Stats::Formula updates_total;
|
||||
Stats::Formula pred_rate;
|
||||
Stats::Formula frac_correct_zero;
|
||||
Stats::Formula frac_correct_one;
|
||||
Stats::Formula coverage_zero;
|
||||
Stats::Formula coverage_one;
|
||||
|
||||
private:
|
||||
bool pred_one(unsigned &counter) { return counter > thresh; }
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
StatData *
|
||||
DataAccess::find() const
|
||||
|
@ -346,4 +346,4 @@ registerResetCallback(Callback *cb)
|
|||
resetQueue.add(cb);
|
||||
}
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
|
|
@ -70,7 +70,7 @@ class Callback;
|
|||
extern Tick curTick;
|
||||
|
||||
/* A namespace for all of the Statistics */
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
/* Contains the statistic implementation details */
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -2897,6 +2897,6 @@ sum(Temp val)
|
|||
return NodePtr(new SumNode<std::plus<Result> >(val));
|
||||
}
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
||||
#endif // __BASE_STATISTICS_HH__
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#ifndef __BASE_STATS_FLAGS_HH__
|
||||
#define __BASE_STATS_FLAGS_HH__
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
/**
|
||||
* Define the storage for format flags.
|
||||
|
@ -68,6 +68,6 @@ enum DisplayMode
|
|||
|
||||
extern DisplayMode DefaultMode;
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
||||
#endif // __BASE_STATS_FLAGS_HH__
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
struct MySqlData
|
||||
{
|
||||
|
@ -841,4 +841,4 @@ MySql::visit(const FormulaData &data)
|
|||
output(data);
|
||||
}
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "base/stats/output.hh"
|
||||
|
||||
namespace MySQL { class Connection; }
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
class DistDataData;
|
||||
class MySqlData;
|
||||
|
@ -144,6 +144,6 @@ class MySql : public Output
|
|||
void configure(const FormulaData &data);
|
||||
};
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
||||
#endif // __BASE_STATS_MYSQL_HH__
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include "base/stats/visit.hh"
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
struct Output : public Visit
|
||||
{
|
||||
|
@ -42,6 +42,6 @@ struct Output : public Visit
|
|||
virtual bool valid() const = 0;
|
||||
};
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
||||
#endif // __BASE_STATS_OUTPUT_HH__
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
namespace Database {
|
||||
|
||||
StatData *
|
||||
|
@ -86,4 +86,4 @@ TheDatabase &db()
|
|||
}
|
||||
|
||||
/* namespace Database */ }
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
class Python;
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
class MainBin;
|
||||
class StatData;
|
||||
|
@ -69,6 +69,6 @@ void regPrint(void *stat);
|
|||
inline std::string name() { return "Statistics Database"; }
|
||||
|
||||
/* namespace Database */ }
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
||||
#endif // __BASE_STATS_STATDB_HH__
|
||||
|
|
|
@ -60,7 +60,7 @@ __nan()
|
|||
}
|
||||
#endif
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
Text::Text()
|
||||
: mystream(false), stream(NULL), compat(false), descriptions(false)
|
||||
|
@ -282,14 +282,14 @@ VectorPrint::operator()(std::ostream &stream) const
|
|||
print(stream);
|
||||
}
|
||||
|
||||
if (flags & ::Statistics::total) {
|
||||
if (flags & ::Stats::total) {
|
||||
print.name = base + "total";
|
||||
print.desc = desc;
|
||||
print.value = total;
|
||||
print(stream);
|
||||
}
|
||||
} else {
|
||||
if (flags & ::Statistics::total) {
|
||||
if (flags & ::Stats::total) {
|
||||
print.value = total;
|
||||
print(stream);
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ Text::visit(const Vector2dData &data)
|
|||
print(*stream);
|
||||
}
|
||||
|
||||
if ((data.flags & ::Statistics::total) && (data.x > 1)) {
|
||||
if ((data.flags & ::Stats::total) && (data.x > 1)) {
|
||||
print.name = data.name;
|
||||
print.desc = data.desc;
|
||||
print.vec = tot_vec;
|
||||
|
@ -728,4 +728,4 @@ Text::visit(const FormulaData &data)
|
|||
visit((const VectorData &)data);
|
||||
}
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "base/stats/output.hh"
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
class Text : public Output
|
||||
{
|
||||
|
@ -72,6 +72,6 @@ class Text : public Output
|
|||
virtual void output();
|
||||
};
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
||||
#endif // __BASE_STATS_TEXT_HH__
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <vector>
|
||||
#include <inttypes.h>
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
/** All counters are of 64-bit values. */
|
||||
typedef double Counter;
|
||||
|
@ -44,6 +44,6 @@ typedef double Result;
|
|||
/** vector of results. */
|
||||
typedef std::vector<Result> VResult;
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
||||
#endif // __BASE_STATS_TYPES_HH__
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include "base/stats/visit.hh"
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
namespace Detail {
|
||||
|
||||
Visit::Visit()
|
||||
|
@ -38,4 +38,4 @@ Visit::~Visit()
|
|||
{}
|
||||
|
||||
/* namespace Detail */ }
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "base/time.hh"
|
||||
#include "sim/host.hh"
|
||||
|
||||
namespace Statistics {
|
||||
namespace Stats {
|
||||
|
||||
class StatData;
|
||||
class ScalarData;
|
||||
|
@ -58,6 +58,6 @@ struct Visit
|
|||
virtual void visit(const FormulaData &data) = 0;
|
||||
};
|
||||
|
||||
/* namespace Statistics */ }
|
||||
/* namespace Stats */ }
|
||||
|
||||
#endif // __BASE_STATS_VISIT_HH__
|
||||
|
|
|
@ -130,7 +130,7 @@ BaseCPU::BaseCPU(const string &_name, int _number_of_threads,
|
|||
void
|
||||
BaseCPU::regStats()
|
||||
{
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
|
||||
numCycles
|
||||
.name(name() + ".numCycles")
|
||||
|
|
|
@ -167,7 +167,7 @@ class BaseCPU : public SimObject
|
|||
|
||||
public:
|
||||
// Number of CPU cycles simulated
|
||||
Statistics::Scalar<> numCycles;
|
||||
Stats::Scalar<> numCycles;
|
||||
};
|
||||
|
||||
#endif // __BASE_CPU_HH__
|
||||
|
|
|
@ -128,7 +128,7 @@ ExecContext::serialize(ostream &os)
|
|||
SERIALIZE_SCALAR(ctx);
|
||||
}
|
||||
if (system->bin) {
|
||||
Statistics::MainBin *cur = Statistics::MainBin::curBin();
|
||||
Stats::MainBin *cur = Stats::MainBin::curBin();
|
||||
string bin_name = cur->name();
|
||||
SERIALIZE_SCALAR(bin_name);
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ MemTest::completeRequest(MemReqPtr &req, uint8_t *data)
|
|||
void
|
||||
MemTest::regStats()
|
||||
{
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
|
||||
|
||||
numReadsStat
|
||||
|
|
|
@ -111,9 +111,9 @@ class MemTest : public BaseCPU
|
|||
Tick noResponseCycles;
|
||||
|
||||
uint64_t numReads;
|
||||
Statistics::Scalar<> numReadsStat;
|
||||
Statistics::Scalar<> numWritesStat;
|
||||
Statistics::Scalar<> numCopiesStat;
|
||||
Stats::Scalar<> numReadsStat;
|
||||
Stats::Scalar<> numWritesStat;
|
||||
Stats::Scalar<> numCopiesStat;
|
||||
|
||||
// called by MemCompleteEvent::process()
|
||||
void completeRequest(MemReqPtr &req, uint8_t *data);
|
||||
|
|
|
@ -254,7 +254,7 @@ SimpleCPU::haltContext(int thread_num)
|
|||
void
|
||||
SimpleCPU::regStats()
|
||||
{
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
|
||||
BaseCPU::regStats();
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ class SimpleCPU : public BaseCPU
|
|||
// number of simulated instructions
|
||||
Counter numInst;
|
||||
Counter startNumInst;
|
||||
Statistics::Scalar<> numInsts;
|
||||
Stats::Scalar<> numInsts;
|
||||
|
||||
virtual Counter totalInstructions() const
|
||||
{
|
||||
|
@ -217,22 +217,22 @@ class SimpleCPU : public BaseCPU
|
|||
}
|
||||
|
||||
// number of simulated memory references
|
||||
Statistics::Scalar<> numMemRefs;
|
||||
Stats::Scalar<> numMemRefs;
|
||||
|
||||
// number of simulated loads
|
||||
Counter numLoad;
|
||||
Counter startNumLoad;
|
||||
|
||||
// number of idle cycles
|
||||
Statistics::Average<> notIdleFraction;
|
||||
Statistics::Formula idleFraction;
|
||||
Stats::Average<> notIdleFraction;
|
||||
Stats::Formula idleFraction;
|
||||
|
||||
// number of cycles stalled for I-cache misses
|
||||
Statistics::Scalar<> icacheStallCycles;
|
||||
Stats::Scalar<> icacheStallCycles;
|
||||
Counter lastIcacheStall;
|
||||
|
||||
// number of cycles stalled for D-cache misses
|
||||
Statistics::Scalar<> dcacheStallCycles;
|
||||
Stats::Scalar<> dcacheStallCycles;
|
||||
Counter lastDcacheStall;
|
||||
|
||||
void processCacheCompletion();
|
||||
|
|
|
@ -212,8 +212,8 @@ EtherDev::regStats()
|
|||
.prereq(rxBytes)
|
||||
;
|
||||
|
||||
txBandwidth = txBytes * Statistics::constant(8) / simSeconds;
|
||||
rxBandwidth = rxBytes * Statistics::constant(8) / simSeconds;
|
||||
txBandwidth = txBytes * Stats::constant(8) / simSeconds;
|
||||
rxBandwidth = rxBytes * Stats::constant(8) / simSeconds;
|
||||
txPacketRate = txPackets / simSeconds;
|
||||
rxPacketRate = rxPackets / simSeconds;
|
||||
}
|
||||
|
|
|
@ -369,14 +369,14 @@ class EtherDev : public PciDev
|
|||
void regStats();
|
||||
|
||||
private:
|
||||
Statistics::Scalar<> txBytes;
|
||||
Statistics::Scalar<> rxBytes;
|
||||
Statistics::Scalar<> txPackets;
|
||||
Statistics::Scalar<> rxPackets;
|
||||
Statistics::Formula txBandwidth;
|
||||
Statistics::Formula rxBandwidth;
|
||||
Statistics::Formula txPacketRate;
|
||||
Statistics::Formula rxPacketRate;
|
||||
Stats::Scalar<> txBytes;
|
||||
Stats::Scalar<> rxBytes;
|
||||
Stats::Scalar<> txPackets;
|
||||
Stats::Scalar<> rxPackets;
|
||||
Stats::Formula txBandwidth;
|
||||
Stats::Formula rxBandwidth;
|
||||
Stats::Formula txPacketRate;
|
||||
Stats::Formula rxPacketRate;
|
||||
|
||||
private:
|
||||
Tick pioLatency;
|
||||
|
|
|
@ -50,7 +50,7 @@ class FnEvent : public PCEvent
|
|||
|
||||
private:
|
||||
std::string _name;
|
||||
Statistics::MainBin *myBin;
|
||||
Stats::MainBin *myBin;
|
||||
};
|
||||
|
||||
#endif // __SYSTEM_EVENTS_HH__
|
||||
|
|
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);
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "sim/host.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace Statistics;
|
||||
using namespace Stats;
|
||||
|
||||
Tick curTick = 0;
|
||||
Tick ticksPerSecond = ULL(2000000000);
|
||||
|
|
Loading…
Reference in a new issue