ClockDomain::ClockDomainStats::ClockDomainStats(ClockDomain &cd)
: Stats::Group(&cd),
- ADD_STAT(clock, "Clock period in ticks")
+ ADD_STAT(clock, UNIT_TICK, "Clock period in ticks")
{
// Expose the current clock period as a stat for observability in
// the dumps
PowerModelState::PowerModelState(const Params &p)
: SimObject(p), _temp(0), clocked_object(NULL),
- ADD_STAT(dynamicPower, "Dynamic power for this object (Watts)"),
- ADD_STAT(staticPower, "Static power for this object (Watts)")
+ ADD_STAT(dynamicPower, UNIT_WATT,
+ "Dynamic power for this object (Watts)"),
+ ADD_STAT(staticPower, UNIT_WATT, "Static power for this object (Watts)")
{
dynamicPower
.method(this, &PowerModelState::getDynamicPower);
PowerModel::PowerModel(const Params &p)
: SimObject(p), states_pm(p.pm), subsystem(p.subsystem),
clocked_object(NULL), power_model_type(p.pm_type),
- ADD_STAT(dynamicPower, "Dynamic power for this power state"),
- ADD_STAT(staticPower, "Static power for this power state")
+ ADD_STAT(dynamicPower, UNIT_WATT,
+ "Dynamic power for this power state"),
+ ADD_STAT(staticPower, UNIT_WATT,
+ "Static power for this power state")
{
panic_if(subsystem == NULL,
"Subsystem is NULL! This is not acceptable for a PowerModel!\n");
ThermalDomain::ThermalDomain(const Params &p)
: SimObject(p), _initTemperature(p.initial_temperature),
node(NULL), subsystem(NULL),
- ADD_STAT(currentTemp, "Temperature in centigrade degrees")
+ ADD_STAT(currentTemp, UNIT_CELSIUS, "Temperature")
{
currentTemp
.functor([this]() { return currentTemperature().toCelsius(); });
PowerDomain::PowerDomainStats::PowerDomainStats(PowerDomain &pd)
: Stats::Group(&pd),
- ADD_STAT(numLeaderCalls,
+ ADD_STAT(numLeaderCalls, UNIT_COUNT,
"Number of calls by leaders to change power domain state"),
- ADD_STAT(numLeaderCallsChangingState,
- "Number of calls by leader to change power domain state "
- "actually resulting in a power state change")
+ ADD_STAT(numLeaderCallsChangingState, UNIT_COUNT,
+ "Number of calls by leader to change power domain state actually "
+ "resulting in a power state change")
{
}
PowerState::PowerStateStats::PowerStateStats(PowerState &co)
: Stats::Group(&co),
powerState(co),
- ADD_STAT(numTransitions,
- "Number of power state transitions"),
- ADD_STAT(numPwrMatchStateTransitions,
+ ADD_STAT(numTransitions, UNIT_COUNT, "Number of power state transitions"),
+ ADD_STAT(numPwrMatchStateTransitions, UNIT_COUNT,
"Number of power state transitions due match request"),
- ADD_STAT(ticksClkGated,
+ ADD_STAT(ticksClkGated, UNIT_TICK,
"Distribution of time spent in the clock gated state"),
- ADD_STAT(pwrStateResidencyTicks,
+ ADD_STAT(pwrStateResidencyTicks, UNIT_TICK,
"Cumulative time (in ticks) in various power states")
{
}
fds(std::make_shared<FDArray>(
params.input, params.output, params.errout)),
childClearTID(0),
- ADD_STAT(numSyscalls, "Number of system calls")
+ ADD_STAT(numSyscalls, UNIT_COUNT, "Number of system calls")
{
if (_pid >= System::maxPID)
fatal("_pid is too large: %d", _pid);
Root::RootStats::RootStats()
: Stats::Group(nullptr),
- ADD_STAT(simSeconds, "Number of seconds simulated"),
- ADD_STAT(simTicks, "Number of ticks simulated"),
- ADD_STAT(finalTick, "Number of ticks from beginning of simulation "
- "(restored from checkpoints and never reset)"),
- ADD_STAT(simFreq, "Frequency of simulated ticks"),
- ADD_STAT(hostSeconds, "Real time elapsed on the host"),
- ADD_STAT(hostTickRate, "Simulator tick rate (ticks/s)"),
- ADD_STAT(hostMemory, "Number of bytes of host memory used"),
+ ADD_STAT(simSeconds, UNIT_SECOND, "Number of seconds simulated"),
+ ADD_STAT(simTicks, UNIT_TICK, "Number of ticks simulated"),
+ ADD_STAT(finalTick, UNIT_TICK,
+ "Number of ticks from beginning of simulation "
+ "(restored from checkpoints and never reset)"),
+ ADD_STAT(simFreq, UNIT_RATE(Stats::Units::Tick, Stats::Units::Second),
+ "The number of ticks per simulated second"),
+ ADD_STAT(hostSeconds, UNIT_SECOND, "Real time elapsed on the host"),
+ ADD_STAT(hostTickRate,
+ UNIT_RATE(Stats::Units::Tick, Stats::Units::Second),
+ "The number of ticks simulated per host second (ticks/s)"),
+ ADD_STAT(hostMemory, UNIT_BYTE, "Number of bytes of host memory used"),
statTime(true),
startTick(0)
VoltageDomain::VoltageDomainStats::VoltageDomainStats(VoltageDomain &vd)
: Stats::Group(&vd),
- ADD_STAT(voltage, "Voltage in Volts")
+ ADD_STAT(voltage, UNIT_VOLT, "Voltage in Volts")
{
voltage.method(&vd, &VoltageDomain::voltage);
}
Stats::Scalar quiesce;
InstStats(Stats::Group *parent) : Stats::Group(parent, "inst"),
- ADD_STAT(arm, "number of arm instructions executed"),
- ADD_STAT(quiesce, "number of quiesce instructions executed")
+ ADD_STAT(arm, UNIT_COUNT,
+ "number of arm instructions executed"),
+ ADD_STAT(quiesce, UNIT_COUNT,
+ "number of quiesce instructions executed")
{}
} instStats;