gem5
v20.1.0.0
|
#include <power_state.hh>
Public Member Functions | |
PowerStateStats (PowerState &ps) | |
void | regStats () override |
Callback to set stat parameters. More... | |
void | preDumpStats () override |
Callback before stats are dumped. More... | |
Public Member Functions inherited from Stats::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. More... | |
virtual | ~Group () |
virtual void | resetStats () |
Callback to reset stats. More... | |
void | addStat (Stats::Info *info) |
Register a stat with this group. More... | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. More... | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. More... | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. More... | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. More... | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Attributes | |
PowerState & | powerState |
Stats::Scalar | numTransitions |
Stats::Scalar | numPwrMatchStateTransitions |
Stats::Distribution | ticksClkGated |
Stats::Vector | pwrStateResidencyTicks |
Tracks the time spent in each of the power states. More... | |
Definition at line 137 of file power_state.hh.
PowerState::PowerStateStats::PowerStateStats | ( | PowerState & | ps | ) |
Definition at line 217 of file power_state.cc.
|
overridevirtual |
Callback before stats are dumped.
This can be overridden by objects that need to perform calculations in addition to the capabiltiies implemented in the stat framework.
For every stats dump, the power state residency and other distribution stats should be computed just before the dump to ensure correct stats value being reported for current dump window. It avoids things like having any unreported time spent in a power state to be forwarded to the next dump window which might have rather unpleasant effects (like perturbing the distribution stats).
Reimplemented from Stats::Group.
Definition at line 263 of file power_state.cc.
References Stats::Group::preDumpStats().
|
overridevirtual |
Callback to set stat parameters.
This callback is typically used for complex stats (e.g., distributions) that need parameters in addition to a name and a description. Stat names and descriptions should typically be set from the constructor usingo from the constructor using the ADD_STAT macro.
Reimplemented from Stats::Group.
Definition at line 232 of file power_state.cc.
References ArmISA::i, Stats::nonan, Stats::nozero, MipsISA::p, Stats::pdf, and Stats::Group::regStats().
Stats::Scalar PowerState::PowerStateStats::numPwrMatchStateTransitions |
Definition at line 147 of file power_state.hh.
Referenced by PowerState::matchPwrState().
Stats::Scalar PowerState::PowerStateStats::numTransitions |
Definition at line 146 of file power_state.hh.
Referenced by PowerState::set().
PowerState& PowerState::PowerStateStats::powerState |
Definition at line 144 of file power_state.hh.
Stats::Vector PowerState::PowerStateStats::pwrStateResidencyTicks |
Tracks the time spent in each of the power states.
Definition at line 150 of file power_state.hh.
Referenced by PowerState::computeStats(), and PowerState::getWeights().
Stats::Distribution PowerState::PowerStateStats::ticksClkGated |
Definition at line 148 of file power_state.hh.
Referenced by PowerState::computeStats().