Go to the documentation of this file.
44 #include "debug/Stats.hh"
50 : mergedParent(
name ? nullptr : parent)
54 }
else if (parent && !
name) {
74 so ?
so->name() :
"?",
91 g.second->resetStats();
101 g.second->preDumpStats();
107 stats.push_back(info);
123 auto pos =
name.find(
".");
124 if (pos == std::string::npos) {
126 for (
auto &info :
stats) {
127 if (info->name ==
name) {
133 const std::string gname =
name.substr(0, pos);
135 if (
g.first == gname) {
136 return g.second->resolveStat(
name.substr(pos + 1));
143 auto info =
g->resolveStat(
name);
158 const std::map<std::string, Group *> &
virtual void regStats()
Callback to set stat parameters.
Group *const mergedParent
Parent pointer if merged into parent.
const std::map< std::string, Group * > & getStatGroups() const
Get all child groups associated with this object.
virtual void preDumpStats()
Callback before stats are dumped.
std::vector< Group * > mergedStatGroups
virtual void resetStats()
Callback to reset stats.
const Info * resolveStat(std::string name) const
Resolve a stat by its name within this group.
std::vector< Info * > stats
const std::string & name()
std::map< std::string, Group * > statGroups
void mergeStatGroup(Group *block)
Merge the contents (stats & children) of a block to this block.
const std::vector< Info * > & getStats() const
Get all stats associated with this object.
void addStat(Stats::Info *info)
Register a stat with this group.
void addStatGroup(const char *name, Group *block)
Add a stat block as a child of this block.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17