gem5  v20.1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Stats::Group Class Reference

Statistics container. More...

#include <group.hh>

Inheritance diagram for Stats::Group:
AbstractMemory::MemStats ArmISA::TableWalker::TableWalkerStats ArmISA::TLB::TlbStats BaseCache::CacheCmdStats BaseCache::CacheStats BaseKvmCPU::StatGroup BaseTags::BaseTagStats BaseTrafficGen::StatGroup BaseXBar::Layer< SrcType, DstType > BPredUnit::BPredUnitStats ClockDomain::ClockDomainStats CommMonitor::MonitorStats Compressor::Base::BaseStats Compressor::BaseDictionaryCompressor::DictionaryStats Compressor::Multi::MultiStats DefaultCommit< Impl >::CommitStats DefaultDecode< Impl >::DecodeStats DefaultFetch< Impl >::FetchStatGroup DefaultRename< Impl >::RenameStats DRAMInterface::DRAMStats DRAMInterface::RankStats ElasticTrace::ElasticTraceStats BaseXBar::Layer< RequestPort, ResponsePort > BaseXBar::Layer< ResponsePort, RequestPort > LoopPredictor::LoopPredictorStats LSQUnit< Impl >::LSQUnitStats MemCtrl::CtrlStats MemTest::MemTestStats Minor::Fetch2::Fetch2Stats NVMInterface::NVMStats PowerDomain::PowerDomainStats PowerState::PowerStateStats Prefetcher::Base::StatGroup Prefetcher::Queued::QueuedStats QoS::MemCtrl::MemCtrlStats RiscvISA::TLB::TlbStats ROB< Impl >::ROBStats SectorTags::SectorTagsStats SimObject SimpleCache::SimpleCacheStats StatisticalCorrector::StatisticalCorrectorStats TAGEBase::TAGEBaseStats ThreadState::ThreadStateStats TraceCPU::ElasticDataGen::ElasticDataGenStatGroup TraceCPU::FixedRetryGen::FixedRetryGenStatGroup TraceCPU::TraceStats VoltageDomain::VoltageDomainStats Workload::WorkloadStats X86ISA::TLB::TlbStats

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 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
 

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
 

Detailed Description

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

Definition at line 83 of file group.hh.

Constructor & Destructor Documentation

◆ ~Group()

Stats::Group::~Group ( )
virtual

Definition at line 59 of file group.cc.

Member Function Documentation

◆ mergeStatGroup()

void Stats::Group::mergeStatGroup ( Group block)
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().

◆ resolveStat()

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".

Parameters
nameName of the desired stat
Returns
Pointer to the stat with the provided name

Definition at line 121 of file group.cc.

References MipsISA::g, mergedStatGroups, name(), statGroups, and stats.

Referenced by Stats::resolve().

Member Data Documentation

◆ mergedParent

Group* const Stats::Group::mergedParent
private

Parent pointer if merged into parent.

Definition at line 208 of file group.hh.

Referenced by addStat().

◆ mergedStatGroups

std::vector<Group *> Stats::Group::mergedStatGroups
private

Definition at line 211 of file group.hh.

Referenced by mergeStatGroup(), preDumpStats(), regStats(), resetStats(), and resolveStat().

◆ statGroups

std::map<std::string, Group *> Stats::Group::statGroups
private

Definition at line 210 of file group.hh.

Referenced by addStatGroup(), getStatGroups(), preDumpStats(), regStats(), resetStats(), and resolveStat().

◆ stats

std::vector<Info *> Stats::Group::stats
private

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

Generated on Wed Sep 30 2020 14:03:12 for gem5 by doxygen 1.8.17