gem5  v21.1.0.2
Functions
The Stats API.

These methods relate to the statistics I/O interface. More...

Functions

 gem5::statistics::Group::Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group. More...
 
virtual void gem5::statistics::Group::regStats ()
 Callback to set stat parameters. More...
 
virtual void gem5::statistics::Group::resetStats ()
 Callback to reset stats. More...
 
virtual void gem5::statistics::Group::preDumpStats ()
 Callback before stats are dumped. More...
 
void gem5::statistics::Group::addStat (statistics::Info *info)
 Register a stat with this group. More...
 
const std::map< std::string, Group * > & gem5::statistics::Group::getStatGroups () const
 Get all child groups associated with this object. More...
 
const std::vector< Info * > & gem5::statistics::Group::getStats () const
 Get all stats associated with this object. More...
 
void gem5::statistics::Group::addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block. More...
 
 gem5::statistics::Group::Group ()=delete
 
 gem5::statistics::Group::Group (const Group &)=delete
 
Groupgem5::statistics::Group::operator= (const Group &)=delete
 

Detailed Description

These methods relate to the statistics I/O interface.

Function Documentation

◆ addStat()

void gem5::statistics::Group::addStat ( statistics::Info info)

Register a stat with this group.

This method is normally called automatically when a stat is instantiated.

Definition at line 109 of file group.cc.

References gem5::statistics::Group::addStat(), gem5::statistics::Group::mergedParent, and gem5::statistics::Group::stats.

Referenced by gem5::statistics::Group::addStat(), gem5::statistics::DataWrap< Distribution, DistInfoProxy >::DataWrap(), and gem5::statistics::Group::mergeStatGroup().

◆ addStatGroup()

void gem5::statistics::Group::addStatGroup ( const char *  name,
Group block 
)

Add a stat block as a child of this block.

This method may only be called from a Group constructor or from regStats. It's typically only called explicitly from Python when setting up the SimObject hierarchy.

Definition at line 117 of file group.cc.

References name(), panic_if, and gem5::statistics::Group::statGroups.

Referenced by gem5::statistics::Group::Group(), gem5::o3::MemDepUnit::init(), gem5::o3::LSQUnit::init(), and gem5::pybind_init_stats().

◆ getStatGroups()

const std::map< std::string, Group * > & gem5::statistics::Group::getStatGroups ( ) const

Get all child groups associated with this object.

Definition at line 181 of file group.cc.

References gem5::statistics::Group::statGroups.

Referenced by gem5::pybind_init_stats().

◆ getStats()

const std::vector< Info * > & gem5::statistics::Group::getStats ( ) const

Get all stats associated with this object.

Definition at line 187 of file group.cc.

References gem5::statistics::Group::stats.

◆ Group() [1/3]

gem5::statistics::Group::Group ( )
delete

◆ Group() [2/3]

gem5::statistics::Group::Group ( const Group )
delete

◆ Group() [3/3]

gem5::statistics::Group::Group ( Group parent,
const char *  name = nullptr 
)

Construct a new statistics group.

The constructor takes two parameters, a parent and a name. The parent group should typically be specified. However, there are special cases where the parent group may be null. One such special case is SimObjects where the Python code performs late binding of the group parent.

If the name parameter is NULL, the group gets merged into the parent group instead of creating a sub-group. Stats belonging to a merged group behave as if they have been added directly to the parent group.

Parameters
parentParent group to associate this object to.
nameName of this group, can be NULL to merge this group with the parent group.

Definition at line 54 of file group.cc.

References gem5::statistics::Group::addStatGroup(), gem5::statistics::Group::mergeStatGroup(), and name().

◆ operator=()

Group& gem5::statistics::Group::operator= ( const Group )
delete

◆ preDumpStats()

void gem5::statistics::Group::preDumpStats ( )
virtual

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.

Reimplemented in gem5::memory::DRAMInterface::RankStats, gem5::PowerState::PowerStateStats, and gem5::BaseTags::BaseTagStats.

Definition at line 99 of file group.cc.

References gem5::MipsISA::g, gem5::statistics::Group::mergedStatGroups, and gem5::statistics::Group::statGroups.

Referenced by gem5::BaseTags::BaseTagStats::preDumpStats(), gem5::PowerState::PowerStateStats::preDumpStats(), gem5::memory::DRAMInterface::RankStats::preDumpStats(), and gem5::pybind_init_stats().

◆ regStats()

void gem5::statistics::Group::regStats ( )
virtual

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 in gem5::memory::NVMInterface::NVMStats, gem5::BaseCache::CacheStats, gem5::memory::DRAMInterface::DRAMStats, gem5::memory::MemCtrl::CtrlStats, gem5::System, gem5::BaseXBar, gem5::memory::DRAMInterface::RankStats, gem5::BaseCPU, gem5::TickedObject, gem5::memory::AbstractMemory::MemStats, gem5::PowerDomain::PowerDomainStats, gem5::memory::qos::MemCtrl::MemCtrlStats, gem5::MinorCPU, gem5::PowerState::PowerStateStats, gem5::compression::Base::BaseStats, gem5::BaseTags::BaseTagStats, gem5::SectorTags::SectorTagsStats, gem5::compression::Multi::MultiStats, gem5::MathExprPowerModel, gem5::ruby::RubySystem, gem5::compression::BaseDictionaryCompressor::DictionaryStats, gem5::memory::qos::Policy, gem5::ruby::HTMSequencer, sc_gem5::Kernel, gem5::CoherentXBar, gem5::SnoopFilter, gem5::ruby::garnet::Router, gem5::ruby::garnet::GarnetNetwork, gem5::ruby::AbstractController, gem5::ruby::Switch, and gem5::ruby::SimpleNetwork.

Definition at line 69 of file group.cc.

References DPRINTF, gem5::MipsISA::g, M5_VAR_USED, gem5::statistics::Group::mergedStatGroups, and gem5::statistics::Group::statGroups.

Referenced by gem5::CxxConfigManager::instantiate(), gem5::pybind_init_stats(), gem5::ruby::SimpleNetwork::regStats(), gem5::compression::BaseDictionaryCompressor::DictionaryStats::regStats(), gem5::ruby::RubySystem::regStats(), gem5::MathExprPowerModel::regStats(), gem5::ruby::Switch::regStats(), gem5::compression::Multi::MultiStats::regStats(), gem5::SectorTags::SectorTagsStats::regStats(), gem5::ruby::AbstractController::regStats(), gem5::BaseTags::BaseTagStats::regStats(), gem5::ruby::garnet::GarnetNetwork::regStats(), gem5::ruby::garnet::Router::regStats(), gem5::compression::Base::BaseStats::regStats(), gem5::PowerState::PowerStateStats::regStats(), gem5::memory::qos::MemCtrl::MemCtrlStats::regStats(), gem5::PowerDomain::PowerDomainStats::regStats(), gem5::memory::AbstractMemory::MemStats::regStats(), gem5::TickedObject::regStats(), gem5::SnoopFilter::regStats(), gem5::BaseCPU::regStats(), gem5::memory::DRAMInterface::RankStats::regStats(), gem5::System::regStats(), gem5::BaseCache::CacheStats::regStats(), and gem5::BaseCache::CacheCmdStats::regStatsFromParent().

◆ resetStats()

void gem5::statistics::Group::resetStats ( )
virtual

Generated on Tue Sep 21 2021 12:27:00 for gem5 by doxygen 1.8.17