gem5  v22.1.0.0
The Stats API.

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


 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

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

Referenced by gem5::statistics::Group::addStat(), gem5::statistics::DataWrap< Derived, InfoProxyType >::DataWrap(), gem5::statistics::Group::mergeStatGroup(), and TEST().

◆ 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

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

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

◆ 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

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

Referenced by gem5::pybind_init_stats(), and TEST().

◆ getStats()

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

Get all stats associated with this object.

Definition at line 187 of file

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

Referenced by TEST().

◆ Group() [1/3]

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

Referenced by TEST().

◆ Group() [2/3]

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

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

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

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

◆ operator=()

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

◆ preDumpStats()

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

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::PowerState::PowerStateStats, gem5::memory::DRAMInterface::RankStats, and gem5::BaseTags::BaseTagStats.

Definition at line 99 of file

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

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

◆ regStats()

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

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

Definition at line 69 of file

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::garnet::GarnetNetwork::regStats(), gem5::ruby::garnet::Router::regStats(), gem5::ruby::SimpleNetwork::regStats(), gem5::ruby::Switch::regStats(), gem5::ruby::AbstractController::regStats(), gem5::SnoopFilter::regStats(), gem5::VegaTLBCoalescer::regStats(), gem5::BaseCPU::regStats(), gem5::memory::AbstractMemory::MemStats::regStats(), gem5::BaseCache::CacheStats::regStats(), gem5::compression::Base::BaseStats::regStats(), gem5::compression::BaseDictionaryCompressor::DictionaryStats::regStats(), gem5::compression::Multi::MultiStats::regStats(), gem5::BaseTags::BaseTagStats::regStats(), gem5::SectorTags::SectorTagsStats::regStats(), gem5::memory::DRAMInterface::RankStats::regStats(), gem5::memory::qos::MemCtrl::MemCtrlStats::regStats(), gem5::ruby::RubySystem::regStats(), gem5::BaseXBar::regStats(), gem5::MathExprPowerModel::regStats(), gem5::PowerDomain::PowerDomainStats::regStats(), gem5::PowerState::PowerStateStats::regStats(), gem5::System::regStats(), gem5::TickedObject::regStats(), sc_gem5::Kernel::regStats(), gem5::BaseCache::CacheCmdStats::regStatsFromParent(), and TEST().

◆ resetStats()

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

Generated on Wed Dec 21 2022 10:23:05 for gem5 by doxygen 1.9.1