summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/alpha_memory.hh32
-rw-r--r--arch/alpha/pseudo_inst.cc8
-rw-r--r--base/hybrid_pred.cc4
-rw-r--r--base/hybrid_pred.hh32
-rw-r--r--base/sat_counter.cc4
-rw-r--r--base/sat_counter.hh36
-rw-r--r--base/statistics.cc4
-rw-r--r--base/statistics.hh4
-rw-r--r--base/stats/flags.hh4
-rw-r--r--base/stats/mysql.cc4
-rw-r--r--base/stats/mysql.hh4
-rw-r--r--base/stats/output.hh4
-rw-r--r--base/stats/statdb.cc4
-rw-r--r--base/stats/statdb.hh4
-rw-r--r--base/stats/text.cc10
-rw-r--r--base/stats/text.hh4
-rw-r--r--base/stats/types.hh4
-rw-r--r--base/stats/visit.cc4
-rw-r--r--base/stats/visit.hh4
-rw-r--r--cpu/base_cpu.cc2
-rw-r--r--cpu/base_cpu.hh2
-rw-r--r--cpu/exec_context.cc2
-rw-r--r--cpu/memtest/memtest.cc2
-rw-r--r--cpu/memtest/memtest.hh6
-rw-r--r--cpu/simple_cpu/simple_cpu.cc2
-rw-r--r--cpu/simple_cpu/simple_cpu.hh12
-rw-r--r--dev/ns_gige.cc4
-rw-r--r--dev/ns_gige.hh16
-rw-r--r--kern/system_events.hh2
-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
-rw-r--r--test/stattest.cc2
39 files changed, 149 insertions, 149 deletions
diff --git a/arch/alpha/alpha_memory.hh b/arch/alpha/alpha_memory.hh
index 12196c44b..b5fc18255 100644
--- a/arch/alpha/alpha_memory.hh
+++ b/arch/alpha/alpha_memory.hh
@@ -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;
diff --git a/arch/alpha/pseudo_inst.cc b/arch/alpha/pseudo_inst.cc
index 0a5c5b006..12dacebd9 100644
--- a/arch/alpha/pseudo_inst.cc
+++ b/arch/alpha/pseudo_inst.cc
@@ -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);
}
diff --git a/base/hybrid_pred.cc b/base/hybrid_pred.cc
index 12bab975b..41cf88675 100644
--- a/base/hybrid_pred.cc
+++ b/base/hybrid_pred.cc
@@ -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;
diff --git a/base/hybrid_pred.hh b/base/hybrid_pred.hh
index 9063f3084..a76977ae2 100644
--- a/base/hybrid_pred.hh
+++ b/base/hybrid_pred.hh
@@ -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
-
- 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::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
+
+ 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,
diff --git a/base/sat_counter.cc b/base/sat_counter.cc
index a8367d8a0..09c8881a5 100644
--- a/base/sat_counter.cc
+++ b/base/sat_counter.cc
@@ -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;
//
diff --git a/base/sat_counter.hh b/base/sat_counter.hh
index a5d9c7e8a..68addbb33 100644
--- a/base/sat_counter.hh
+++ b/base/sat_counter.hh
@@ -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
-
- Statistics::Scalar<> record_zero; //updates_zero
- Statistics::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::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
+
+ Stats::Scalar<> record_zero; //updates_zero
+ Stats::Scalar<> record_one; //updates_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; }
diff --git a/base/statistics.cc b/base/statistics.cc
index 1a44cd342..78012bff7 100644
--- a/base/statistics.cc
+++ b/base/statistics.cc
@@ -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 */ }
diff --git a/base/statistics.hh b/base/statistics.hh
index ee09cc622..bd1698ae7 100644
--- a/base/statistics.hh
+++ b/base/statistics.hh
@@ -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__
diff --git a/base/stats/flags.hh b/base/stats/flags.hh
index 2303de172..b86f87d25 100644
--- a/base/stats/flags.hh
+++ b/base/stats/flags.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__
diff --git a/base/stats/mysql.cc b/base/stats/mysql.cc
index 676bc555c..c16332d1b 100644
--- a/base/stats/mysql.cc
+++ b/base/stats/mysql.cc
@@ -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 */ }
diff --git a/base/stats/mysql.hh b/base/stats/mysql.hh
index 4ff474752..dd88f5724 100644
--- a/base/stats/mysql.hh
+++ b/base/stats/mysql.hh
@@ -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__
diff --git a/base/stats/output.hh b/base/stats/output.hh
index 9f1fbf415..186d7bab1 100644
--- a/base/stats/output.hh
+++ b/base/stats/output.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__
diff --git a/base/stats/statdb.cc b/base/stats/statdb.cc
index f54272a50..cd5a095c0 100644
--- a/base/stats/statdb.cc
+++ b/base/stats/statdb.cc
@@ -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 */ }
diff --git a/base/stats/statdb.hh b/base/stats/statdb.hh
index fb672e1dc..6935a9aa0 100644
--- a/base/stats/statdb.hh
+++ b/base/stats/statdb.hh
@@ -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__
diff --git a/base/stats/text.cc b/base/stats/text.cc
index 79a91e661..511dbe638 100644
--- a/base/stats/text.cc
+++ b/base/stats/text.cc
@@ -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 */ }
diff --git a/base/stats/text.hh b/base/stats/text.hh
index 89bddf0cb..88e32ff0a 100644
--- a/base/stats/text.hh
+++ b/base/stats/text.hh
@@ -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__
diff --git a/base/stats/types.hh b/base/stats/types.hh
index 4451c4e6e..dcfbd5fa9 100644
--- a/base/stats/types.hh
+++ b/base/stats/types.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__
diff --git a/base/stats/visit.cc b/base/stats/visit.cc
index fec11b262..88cd466b4 100644
--- a/base/stats/visit.cc
+++ b/base/stats/visit.cc
@@ -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 */ }
diff --git a/base/stats/visit.hh b/base/stats/visit.hh
index a03842c52..3a46bb9ef 100644
--- a/base/stats/visit.hh
+++ b/base/stats/visit.hh
@@ -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__
diff --git a/cpu/base_cpu.cc b/cpu/base_cpu.cc
index fe88891d6..4c162986e 100644
--- a/cpu/base_cpu.cc
+++ b/cpu/base_cpu.cc
@@ -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")
diff --git a/cpu/base_cpu.hh b/cpu/base_cpu.hh
index 0b4a38b0e..9e55d5d3c 100644
--- a/cpu/base_cpu.hh
+++ b/cpu/base_cpu.hh
@@ -167,7 +167,7 @@ class BaseCPU : public SimObject
public:
// Number of CPU cycles simulated
- Statistics::Scalar<> numCycles;
+ Stats::Scalar<> numCycles;
};
#endif // __BASE_CPU_HH__
diff --git a/cpu/exec_context.cc b/cpu/exec_context.cc
index a89cf4bb5..7f7719bf0 100644
--- a/cpu/exec_context.cc
+++ b/cpu/exec_context.cc
@@ -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);
}
diff --git a/cpu/memtest/memtest.cc b/cpu/memtest/memtest.cc
index 5d608976d..1d745724f 100644
--- a/cpu/memtest/memtest.cc
+++ b/cpu/memtest/memtest.cc
@@ -186,7 +186,7 @@ MemTest::completeRequest(MemReqPtr &req, uint8_t *data)
void
MemTest::regStats()
{
- using namespace Statistics;
+ using namespace Stats;
numReadsStat
diff --git a/cpu/memtest/memtest.hh b/cpu/memtest/memtest.hh
index f2409d54c..4bde5c066 100644
--- a/cpu/memtest/memtest.hh
+++ b/cpu/memtest/memtest.hh
@@ -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);
diff --git a/cpu/simple_cpu/simple_cpu.cc b/cpu/simple_cpu/simple_cpu.cc
index 617c91e68..765507345 100644
--- a/cpu/simple_cpu/simple_cpu.cc
+++ b/cpu/simple_cpu/simple_cpu.cc
@@ -254,7 +254,7 @@ SimpleCPU::haltContext(int thread_num)
void
SimpleCPU::regStats()
{
- using namespace Statistics;
+ using namespace Stats;
BaseCPU::regStats();
diff --git a/cpu/simple_cpu/simple_cpu.hh b/cpu/simple_cpu/simple_cpu.hh
index a04dcd057..a9091da7e 100644
--- a/cpu/simple_cpu/simple_cpu.hh
+++ b/cpu/simple_cpu/simple_cpu.hh
@@ -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();
diff --git a/dev/ns_gige.cc b/dev/ns_gige.cc
index cae90a3b4..f5cbdbb9a 100644
--- a/dev/ns_gige.cc
+++ b/dev/ns_gige.cc
@@ -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;
}
diff --git a/dev/ns_gige.hh b/dev/ns_gige.hh
index cb6550720..ccc7f8e14 100644
--- a/dev/ns_gige.hh
+++ b/dev/ns_gige.hh
@@ -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;
diff --git a/kern/system_events.hh b/kern/system_events.hh
index fdf2a06c9..dba3f326c 100644
--- a/kern/system_events.hh
+++ b/kern/system_events.hh
@@ -50,7 +50,7 @@ class FnEvent : public PCEvent
private:
std::string _name;
- Statistics::MainBin *myBin;
+ Stats::MainBin *myBin;
};
#endif // __SYSTEM_EVENTS_HH__
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 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 <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 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<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);
diff --git a/test/stattest.cc b/test/stattest.cc
index 9b7ba9857..1a035859a 100644
--- a/test/stattest.cc
+++ b/test/stattest.cc
@@ -41,7 +41,7 @@
#include "sim/host.hh"
using namespace std;
-using namespace Statistics;
+using namespace Stats;
Tick curTick = 0;
Tick ticksPerSecond = ULL(2000000000);