gem5 v24.0.0.0
|
#include <info.hh>
Public Member Functions | |
Info () | |
virtual | ~Info () |
void | setName (const std::string &name, bool old_style=true) |
Set the name of this statistic. | |
void | setSeparator (std::string _sep) |
StorageParams const * | getStorageParams () const |
Getter for the storage params. | |
void | setStorageParams (const StorageParams *const params) |
Setter for the storage params. | |
virtual bool | check () const =0 |
Check that this stat has been set up properly and is ready for use. | |
bool | baseCheck () const |
virtual void | enable () |
Enable the stat for use. | |
virtual void | prepare ()=0 |
Prepare the stat for dumping. | |
virtual void | reset ()=0 |
Reset the stat to the default state. | |
virtual bool | zero () const =0 |
virtual void | visit (Output &visitor)=0 |
Visitor entry for outputing statistics data. | |
Static Public Member Functions | |
static bool | less (Info *stat1, Info *stat2) |
Checks if the first stat's name is alphabetically less than the second. | |
Public Attributes | |
std::string | name |
The name of the stat. | |
const units::Base * | unit = units::Unspecified::get() |
The unit of the stat. | |
std::string | desc |
The description of the stat. | |
Flags | flags |
The formatting flags. | |
int | precision |
The display precision. | |
const Info * | prereq |
A pointer to a prerequisite Stat. | |
int | id |
Static Public Attributes | |
static std::string | separatorString = "::" |
The separator string used for vectors, dist, etc. | |
static int | id_count = 0 |
A unique stat ID for each stat in the simulator. | |
Private Attributes | |
std::unique_ptr< const StorageParams > | storageParams |
gem5::statistics::Info::Info | ( | ) |
Definition at line 71 of file info.cc.
References gem5::debug::breakpoint(), gem5::statistics::debug_break_id, and id_count.
bool gem5::statistics::Info::baseCheck | ( | ) | const |
Definition at line 172 of file info.cc.
References gem5::statistics::display, flags, gem5::statistics::init, name, and panic.
Referenced by gem5::pybind_init_stats(), TEST(), TEST(), TEST(), and TEST().
|
pure virtual |
Check that this stat has been set up properly and is ready for use.
Implemented in DummyInfo, gem5::statistics::InfoProxy< Stat, DistInfo >, gem5::statistics::InfoProxy< Stat, FormulaInfo >, gem5::statistics::InfoProxy< Stat, ScalarInfo >, gem5::statistics::InfoProxy< Stat, SparseHistInfo >, gem5::statistics::InfoProxy< Stat, Vector2dInfo >, gem5::statistics::InfoProxy< Stat, VectorDistInfo >, gem5::statistics::InfoProxy< Stat, VectorInfo >, gem5::statistics::ProxyInfo, and TestInfo.
Referenced by gem5::pybind_init_stats().
|
virtual |
Enable the stat for use.
Reimplemented in gem5::statistics::Vector2dInfo, gem5::statistics::VectorDistInfo, and gem5::statistics::VectorInfo.
Definition at line 192 of file info.cc.
Referenced by gem5::pybind_init_stats().
StorageParams const * gem5::statistics::Info::getStorageParams | ( | ) | const |
Getter for the storage params.
These parameters should only be modified using the respective setter.
Definition at line 84 of file info.cc.
References storageParams.
Referenced by gem5::statistics::DistBase< Derived, Stor >::doInit(), gem5::statistics::ScalarBase< Derived, Stor >::doInit(), gem5::statistics::SparseHistBase< Derived, Stor >::doInit(), gem5::statistics::DistBase< Derived, Stor >::prepare(), gem5::statistics::SparseHistBase< Derived, Stor >::prepare(), gem5::statistics::Vector2dBase< Derived, Stor >::prepare(), gem5::statistics::VectorDistBase< Derived, Stor >::prepare(), and gem5::statistics::Vector2dBase< Derived, Stor >::reset().
Checks if the first stat's name is alphabetically less than the second.
This function breaks names up at periods and considers each subname separately.
stat1 | The first stat. |
stat2 | The second stat. |
Definition at line 146 of file info.cc.
References gem5::ArmISA::i, name, and gem5::tokenize().
|
pure virtual |
Prepare the stat for dumping.
Implemented in DummyInfo, gem5::statistics::InfoProxy< Stat, DistInfo >, gem5::statistics::InfoProxy< Stat, FormulaInfo >, gem5::statistics::InfoProxy< Stat, ScalarInfo >, gem5::statistics::InfoProxy< Stat, SparseHistInfo >, gem5::statistics::InfoProxy< Stat, Vector2dInfo >, gem5::statistics::InfoProxy< Stat, VectorDistInfo >, gem5::statistics::InfoProxy< Stat, VectorInfo >, gem5::statistics::ProxyInfo, and TestInfo.
Referenced by gem5::pybind_init_stats().
|
pure virtual |
Reset the stat to the default state.
Implemented in DummyInfo, gem5::statistics::InfoProxy< Stat, DistInfo >, gem5::statistics::InfoProxy< Stat, FormulaInfo >, gem5::statistics::InfoProxy< Stat, ScalarInfo >, gem5::statistics::InfoProxy< Stat, SparseHistInfo >, gem5::statistics::InfoProxy< Stat, Vector2dInfo >, gem5::statistics::InfoProxy< Stat, VectorDistInfo >, gem5::statistics::InfoProxy< Stat, VectorInfo >, gem5::statistics::ProxyInfo, and TestInfo.
Referenced by gem5::pybind_init_stats().
void gem5::statistics::Info::setName | ( | const std::string & | name, |
bool | old_style = true ) |
Set the name of this statistic.
Special handling must be done when creating an old-style statistic (i.e., stats without a parent group).
name | The new name. |
old_style | Whether we are using the old style. |
Definition at line 127 of file info.cc.
References name, gem5::statistics::nameMap(), gem5::MipsISA::p, panic, panic_if, and gem5::statistics::validateStatName().
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inline |
void gem5::statistics::Info::setStorageParams | ( | const StorageParams *const | params | ) |
Setter for the storage params.
Definition at line 90 of file info.cc.
References storageParams.
Referenced by gem5::statistics::InfoAccess::setParams().
|
pure virtual |
Visitor entry for outputing statistics data.
Implemented in DummyInfo, gem5::statistics::InfoProxy< Stat, DistInfo >, gem5::statistics::InfoProxy< Stat, FormulaInfo >, gem5::statistics::InfoProxy< Stat, ScalarInfo >, gem5::statistics::InfoProxy< Stat, SparseHistInfo >, gem5::statistics::InfoProxy< Stat, Vector2dInfo >, gem5::statistics::InfoProxy< Stat, VectorDistInfo >, gem5::statistics::InfoProxy< Stat, VectorInfo >, gem5::statistics::ProxyInfo, and TestInfo.
Referenced by gem5::pybind_init_stats().
|
pure virtual |
Implemented in DummyInfo, gem5::statistics::InfoProxy< Stat, DistInfo >, gem5::statistics::InfoProxy< Stat, FormulaInfo >, gem5::statistics::InfoProxy< Stat, ScalarInfo >, gem5::statistics::InfoProxy< Stat, SparseHistInfo >, gem5::statistics::InfoProxy< Stat, Vector2dInfo >, gem5::statistics::InfoProxy< Stat, VectorDistInfo >, gem5::statistics::InfoProxy< Stat, VectorInfo >, gem5::statistics::ProxyInfo, and TestInfo.
Referenced by gem5::statistics::Text::noOutput(), and gem5::pybind_init_stats().
std::string gem5::statistics::Info::desc |
The description of the stat.
Definition at line 89 of file info.hh.
Referenced by gem5::statistics::Hdf5::appendStat(), gem5::statistics::DistPrint::init(), gem5::statistics::SparseHistPrint::init(), gem5::pybind_init_stats(), gem5::statistics::Text::visit(), gem5::statistics::Text::visit(), and gem5::statistics::Text::visit().
Flags gem5::statistics::Info::flags |
The formatting flags.
Definition at line 91 of file info.hh.
Referenced by baseCheck(), gem5::statistics::DistPrint::init(), gem5::statistics::SparseHistPrint::init(), gem5::statistics::Text::noOutput(), gem5::pybind_init_stats(), gem5::statistics::InfoAccess::setInit(), TEST(), TEST(), TEST(), gem5::statistics::Text::visit(), gem5::statistics::Text::visit(), and gem5::statistics::Text::visit().
int gem5::statistics::Info::id |
Definition at line 101 of file info.hh.
Referenced by gem5::pybind_init_stats(), and TEST().
|
static |
std::string gem5::statistics::Info::name |
The name of the stat.
Definition at line 83 of file info.hh.
Referenced by gem5::statistics::Hdf5::appendStat(), baseCheck(), gem5::statistics::DistPrint::DistPrint(), gem5::statistics::DistPrint::init(), gem5::statistics::SparseHistPrint::init(), less(), gem5::pybind_init_stats(), setName(), gem5::statistics::ScalarStatNode::str(), gem5::statistics::VectorStatNode::str(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), gem5::statistics::Text::visit(), gem5::statistics::Text::visit(), and gem5::statistics::Text::visit().
int gem5::statistics::Info::precision |
The display precision.
Definition at line 93 of file info.hh.
Referenced by gem5::statistics::DistPrint::init(), gem5::statistics::SparseHistPrint::init(), gem5::statistics::Text::visit(), gem5::statistics::Text::visit(), and gem5::statistics::Text::visit().
const Info* gem5::statistics::Info::prereq |
A pointer to a prerequisite Stat.
Definition at line 95 of file info.hh.
Referenced by gem5::statistics::Text::noOutput().
|
static |
The separator string used for vectors, dist, etc.
Definition at line 85 of file info.hh.
Referenced by gem5::statistics::DistPrint::init(), gem5::statistics::SparseHistPrint::init(), setSeparator(), TEST(), gem5::statistics::Text::visit(), and gem5::statistics::Text::visit().
|
private |
Definition at line 104 of file info.hh.
Referenced by getStorageParams(), and setStorageParams().
const units::Base* gem5::statistics::Info::unit = units::Unspecified::get() |
The unit of the stat.
Definition at line 87 of file info.hh.
Referenced by gem5::statistics::DistPrint::DistPrint(), gem5::statistics::DistPrint::init(), gem5::statistics::SparseHistPrint::init(), gem5::pybind_init_stats(), gem5::statistics::Text::visit(), gem5::statistics::Text::visit(), and gem5::statistics::Text::visit().