gem5
v20.1.0.0
|
Statistics container. More...
#include <group.hh>
Public Member Functions | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. More... | |
virtual | ~Group () |
virtual void | regStats () |
Callback to set stat parameters. More... | |
virtual void | resetStats () |
Callback to reset stats. More... | |
virtual void | preDumpStats () |
Callback before stats are dumped. 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 |
Private Member Functions | |
void | mergeStatGroup (Group *block) |
Merge the contents (stats & children) of a block to this block. More... | |
Private Attributes | |
Group *const | mergedParent |
Parent pointer if merged into parent. More... | |
std::map< std::string, Group * > | statGroups |
std::vector< Group * > | mergedStatGroups |
std::vector< Info * > | stats |
Statistics container.
A stat group is a hierarchical structure that contain statistics and other groups. Groups are used by the stat system to reflect gem5's SimObject hierarchy and to expose internal hierarchy within an object. They can also be used to conveniently group stats into their own class/struct and then be merged into the parent group (typically a SimObject).
|
private |
Merge the contents (stats & children) of a block to this block.
This is called on a parent group by the child when it is being merged into the parent.
Definition at line 153 of file group.cc.
References mergedStatGroups.
Referenced by Group().
const Info * Stats::Group::resolveStat | ( | std::string | name | ) | const |
Resolve a stat by its name within this group.
This method goes through the stats in this group and sub-groups and returns a pointer to the the stat that matches the provided name. The input name has to be relative to the name of this group. For example, if this group is the SimObject system.bigCluster.cpus and we want the stat system.bigCluster.cpus.ipc, the input param should be the string "ipc".
name | Name of the desired stat |
Definition at line 121 of file group.cc.
References MipsISA::g, mergedStatGroups, name(), statGroups, and stats.
Referenced by Stats::resolve().
|
private |
|
private |
Definition at line 211 of file group.hh.
Referenced by mergeStatGroup(), preDumpStats(), regStats(), resetStats(), and resolveStat().
|
private |
Definition at line 210 of file group.hh.
Referenced by addStatGroup(), getStatGroups(), preDumpStats(), regStats(), resetStats(), and resolveStat().
|
private |
Definition at line 212 of file group.hh.
Referenced by addStat(), DefaultCommit< Impl >::commit(), DefaultCommit< Impl >::commitHead(), DefaultCommit< Impl >::commitInsts(), getStats(), CommMonitor::recvAtomic(), CommMonitor::recvTimingReq(), CommMonitor::recvTimingResp(), resetStats(), resolveStat(), CommMonitor::samplePeriodic(), and DefaultCommit< Impl >::updateComInstStats().