gem5  v20.1.0.0
Public Member Functions | Public Attributes | List of all members
PowerState::PowerStateStats Struct Reference

#include <power_state.hh>

Inheritance diagram for PowerState::PowerStateStats:
Stats::Group

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 InforesolveStat (std::string name) const
 Resolve a stat by its name within this group. More...
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 

Public Attributes

PowerStatepowerState
 
Stats::Scalar numTransitions
 
Stats::Scalar numPwrMatchStateTransitions
 
Stats::Distribution ticksClkGated
 
Stats::Vector pwrStateResidencyTicks
 Tracks the time spent in each of the power states. More...
 

Detailed Description

Definition at line 137 of file power_state.hh.

Constructor & Destructor Documentation

◆ PowerStateStats()

PowerState::PowerStateStats::PowerStateStats ( PowerState ps)

Definition at line 217 of file power_state.cc.

Member Function Documentation

◆ preDumpStats()

void PowerState::PowerStateStats::preDumpStats ( )
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().

◆ regStats()

void PowerState::PowerStateStats::regStats ( )
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().

Member Data Documentation

◆ numPwrMatchStateTransitions

Stats::Scalar PowerState::PowerStateStats::numPwrMatchStateTransitions

Definition at line 147 of file power_state.hh.

Referenced by PowerState::matchPwrState().

◆ numTransitions

Stats::Scalar PowerState::PowerStateStats::numTransitions

Definition at line 146 of file power_state.hh.

Referenced by PowerState::set().

◆ powerState

PowerState& PowerState::PowerStateStats::powerState

Definition at line 144 of file power_state.hh.

◆ pwrStateResidencyTicks

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().

◆ ticksClkGated

Stats::Distribution PowerState::PowerStateStats::ticksClkGated

Definition at line 148 of file power_state.hh.

Referenced by PowerState::computeStats().


The documentation for this struct was generated from the following files:

Generated on Wed Sep 30 2020 14:02:29 for gem5 by doxygen 1.8.17