gem5
|
#include <info.hh>
Public Member Functions | |
Info () | |
virtual | ~Info () |
void | setName (const std::string &name) |
Set the name of this statistic. More... | |
void | setSeparator (std::string _sep) |
virtual bool | check () const =0 |
Check that this stat has been set up properly and is ready for use. More... | |
bool | baseCheck () const |
virtual void | enable () |
Enable the stat for use. More... | |
virtual void | prepare ()=0 |
Prepare the stat for dumping. More... | |
virtual void | reset ()=0 |
Reset the stat to the default state. More... | |
virtual bool | zero () const =0 |
virtual void | visit (Output &visitor)=0 |
Visitor entry for outputing statistics data. More... | |
Static Public Member Functions | |
static bool | less (Info *stat1, Info *stat2) |
Checks if the first stat's name is alphabetically less than the second. More... | |
Public Attributes | |
std::string | name |
The name of the stat. More... | |
std::string | desc |
The description of the stat. More... | |
Flags | flags |
The formatting flags. More... | |
int | precision |
The display precision. More... | |
const Info * | prereq |
A pointer to a prerequisite Stat. More... | |
int | id |
const StorageParams * | storageParams |
Static Public Attributes | |
static std::string | separatorString = "::" |
The separator string used for vectors, dist, etc. More... | |
static int | id_count = 0 |
A unique stat ID for each stat in the simulator. More... | |
Stats::Info::Info | ( | ) |
Definition at line 128 of file statistics.cc.
References Debug::breakpoint(), Stats::debug_break_id, and id_count.
|
virtual |
Definition at line 136 of file statistics.cc.
bool Stats::Info::baseCheck | ( | ) | const |
Definition at line 219 of file statistics.cc.
References cprintf(), Stats::display, flags, Stats::init, name, and panic.
Referenced by pybind_init_stats().
|
pure virtual |
Check that this stat has been set up properly and is ready for use.
Implemented in Stats::ProxyInfo, Stats::InfoProxy< Stat, VectorDistInfo >, Stats::InfoProxy< Stat, ScalarInfo >, Stats::InfoProxy< Stat, SparseHistInfo >, Stats::InfoProxy< Stat, Vector2dInfo >, Stats::InfoProxy< Stat, DistInfo >, Stats::InfoProxy< Stat, VectorInfo >, and Stats::InfoProxy< Stat, FormulaInfo >.
Referenced by pybind_init_stats().
|
virtual |
Enable the stat for use.
Reimplemented in Stats::Vector2dInfo, Stats::VectorDistInfo, and Stats::VectorInfo.
Definition at line 240 of file statistics.cc.
Referenced by pybind_init_stats().
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 193 of file statistics.cc.
References ArmISA::i, name, and tokenize().
|
pure virtual |
Prepare the stat for dumping.
Implemented in Stats::ProxyInfo, Stats::InfoProxy< Stat, VectorDistInfo >, Stats::InfoProxy< Stat, ScalarInfo >, Stats::InfoProxy< Stat, SparseHistInfo >, Stats::InfoProxy< Stat, Vector2dInfo >, Stats::InfoProxy< Stat, DistInfo >, Stats::InfoProxy< Stat, VectorInfo >, and Stats::InfoProxy< Stat, FormulaInfo >.
Referenced by pybind_init_stats().
|
pure virtual |
Reset the stat to the default state.
Implemented in Stats::ProxyInfo, Stats::InfoProxy< Stat, VectorDistInfo >, Stats::InfoProxy< Stat, ScalarInfo >, Stats::InfoProxy< Stat, SparseHistInfo >, Stats::InfoProxy< Stat, Vector2dInfo >, Stats::InfoProxy< Stat, DistInfo >, Stats::InfoProxy< Stat, VectorInfo >, and Stats::InfoProxy< Stat, FormulaInfo >.
Referenced by pybind_init_stats().
void Stats::Info::setName | ( | const std::string & | name | ) |
Set the name of this statistic.
Definition at line 172 of file statistics.cc.
References name, Stats::nameMap(), MipsISA::p, panic, and Stats::validateStatName().
Referenced by Stats::DataWrap< SparseHistogram, SparseHistInfoProxy >::name().
|
inline |
Definition at line 100 of file info.hh.
References separatorString.
|
pure virtual |
Visitor entry for outputing statistics data.
Implemented in Stats::ProxyInfo, Stats::InfoProxy< Stat, VectorDistInfo >, Stats::InfoProxy< Stat, ScalarInfo >, Stats::InfoProxy< Stat, SparseHistInfo >, Stats::InfoProxy< Stat, Vector2dInfo >, Stats::InfoProxy< Stat, DistInfo >, Stats::InfoProxy< Stat, VectorInfo >, and Stats::InfoProxy< Stat, FormulaInfo >.
Referenced by pybind_init_stats().
|
pure virtual |
Implemented in Stats::ProxyInfo, Stats::InfoProxy< Stat, VectorDistInfo >, Stats::InfoProxy< Stat, ScalarInfo >, Stats::InfoProxy< Stat, SparseHistInfo >, Stats::InfoProxy< Stat, Vector2dInfo >, Stats::InfoProxy< Stat, DistInfo >, Stats::InfoProxy< Stat, VectorInfo >, and Stats::InfoProxy< Stat, FormulaInfo >.
Referenced by Stats::Text::noOutput(), and pybind_init_stats().
std::string Stats::Info::desc |
The description of the stat.
Definition at line 77 of file info.hh.
Referenced by Stats::DistPrint::init(), Stats::SparseHistPrint::init(), pybind_init_stats(), and Stats::Text::visit().
Flags Stats::Info::flags |
The formatting flags.
Definition at line 79 of file info.hh.
Referenced by baseCheck(), Stats::DistPrint::init(), Stats::SparseHistPrint::init(), Stats::DataWrap< SparseHistogram, SparseHistInfoProxy >::name(), Stats::Text::noOutput(), pybind_init_stats(), and Stats::Text::visit().
int Stats::Info::id |
Definition at line 89 of file info.hh.
Referenced by pybind_init_stats().
|
static |
std::string Stats::Info::name |
The name of the stat.
Definition at line 73 of file info.hh.
Referenced by baseCheck(), Stats::DistPrint::DistPrint(), Stats::DistPrint::init(), Stats::SparseHistPrint::init(), less(), pybind_init_stats(), setName(), Stats::ScalarStatNode::str(), Stats::VectorStatNode::str(), and Stats::Text::visit().
int Stats::Info::precision |
The display precision.
Definition at line 81 of file info.hh.
Referenced by Stats::DistPrint::init(), Stats::SparseHistPrint::init(), and Stats::Text::visit().
const Info* Stats::Info::prereq |
A pointer to a prerequisite Stat.
Definition at line 83 of file info.hh.
Referenced by Stats::Text::noOutput().
|
static |
The separator string used for vectors, dist, etc.
Definition at line 75 of file info.hh.
Referenced by Stats::DistPrint::init(), Stats::SparseHistPrint::init(), setSeparator(), and Stats::Text::visit().
const StorageParams* Stats::Info::storageParams |
Definition at line 92 of file info.hh.
Referenced by Stats::DistStor::prepare(), Stats::HistStor::prepare(), Stats::SampleStor::prepare(), Stats::AvgSampleStor::prepare(), Stats::DistStor::reset(), and Stats::HistStor::reset().