gem5  v19.0.0.0
Public Member Functions | Public Attributes | List of all members
ClockedObject::ClockedObjectStats Struct Reference

#include <clocked_object.hh>

Inheritance diagram for ClockedObject::ClockedObjectStats:
Stats::Group

Public Member Functions

 ClockedObjectStats (ClockedObject &co)
 
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 ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 
 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...
 

Public Attributes

ClockedObjectclockedObject
 
Stats::Scalar numPwrStateTransitions
 
Stats::Distribution pwrStateClkGateDist
 
Stats::Vector pwrStateResidencyTicks
 

Detailed Description

Definition at line 281 of file clocked_object.hh.

Constructor & Destructor Documentation

◆ ClockedObjectStats()

ClockedObject::ClockedObjectStats::ClockedObjectStats ( ClockedObject co)

Definition at line 149 of file clocked_object.cc.

Member Function Documentation

◆ preDumpStats()

void ClockedObject::ClockedObjectStats::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 192 of file clocked_object.cc.

References clockedObject, ClockedObject::computeStats(), and Stats::Group::preDumpStats().

◆ regStats()

void ClockedObject::ClockedObjectStats::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 162 of file clocked_object.cc.

References clockedObject, Stats::DataWrap< Derived, InfoProxyType >::flags(), ArmISA::i, Stats::VectorBase< Derived, Stor >::init(), Stats::Distribution::init(), Stats::nonan, Stats::nozero, numPwrStateTransitions, MipsISA::p, ClockedObject::params(), Stats::pdf, pwrStateClkGateDist, pwrStateResidencyTicks, Stats::Group::regStats(), and Stats::DataWrapVec< Derived, InfoProxyType >::subname().

Member Data Documentation

◆ clockedObject

ClockedObject& ClockedObject::ClockedObjectStats::clockedObject

Definition at line 288 of file clocked_object.hh.

Referenced by preDumpStats(), and regStats().

◆ numPwrStateTransitions

Stats::Scalar ClockedObject::ClockedObjectStats::numPwrStateTransitions

Definition at line 289 of file clocked_object.hh.

Referenced by ClockedObject::pwrState(), and regStats().

◆ pwrStateClkGateDist

Stats::Distribution ClockedObject::ClockedObjectStats::pwrStateClkGateDist

Definition at line 290 of file clocked_object.hh.

Referenced by ClockedObject::computeStats(), and regStats().

◆ pwrStateResidencyTicks

Stats::Vector ClockedObject::ClockedObjectStats::pwrStateResidencyTicks

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

Generated on Fri Feb 28 2020 16:27:09 for gem5 by doxygen 1.8.13