gem5 v24.0.0.0
|
Implementation of a sparse histogram stat. More...
#include <statistics.hh>
Public Types | |
typedef SparseHistInfoProxy< Derived > | Info |
typedef Stor | Storage |
typedef Stor::Params | Params |
Public Types inherited from gem5::statistics::DataWrap< Derived, SparseHistInfoProxy > | |
typedef SparseHistInfoProxy< Derived > | Info |
Public Member Functions | |
SparseHistBase (Group *parent, const char *name, const units::Base *unit, const char *desc) | |
template<typename U > | |
void | sample (const U &v, int n=1) |
Add a value to the distribtion n times. | |
size_type | size () const |
Return the number of entries in this stat. | |
bool | zero () const |
Return true if no samples have been added. | |
void | prepare () |
void | reset () |
Reset stat value to default. | |
Public Member Functions inherited from gem5::statistics::DataWrap< Derived, SparseHistInfoProxy > | |
const Info * | info () const |
DataWrap ()=delete | |
DataWrap (const DataWrap &)=delete | |
DataWrap (Group *parent, const char *name, const units::Base *unit, const char *desc) | |
DataWrap & | operator= (const DataWrap &)=delete |
Derived & | name (const std::string &name) |
Set the name and marks this stat to print at the end of simulation. | |
const std::string & | name () const |
Derived & | setSeparator (const std::string &_sep) |
Set the character(s) used between the name and vector number on vectors, dist, etc. | |
const std::string & | setSeparator () const |
Derived & | unit (const units::Base *_unit) |
Set the unit of the stat. | |
Derived & | desc (const std::string &_desc) |
Set the description and marks this stat to print at the end of simulation. | |
Derived & | precision (int _precision) |
Set the precision and marks this stat to print at the end of simulation. | |
Derived & | flags (Flags _flags) |
Set the flags and marks this stat to print at the end of simulation. | |
Derived & | prereq (const Stat &prereq) |
Set the prerequisite stat and marks this stat to print at the end of simulation. | |
Public Member Functions inherited from gem5::statistics::InfoAccess | |
InfoAccess () | |
void | reset () |
Reset the stat to the default state. | |
bool | zero () const |
bool | check () const |
Check that this stat has been set up properly and is ready for use. | |
Protected Member Functions | |
Storage * | data () |
Retrieve the storage. | |
const Storage * | data () const |
Retrieve a const pointer to the storage. | |
void | doInit () |
Protected Member Functions inherited from gem5::statistics::DataWrap< Derived, SparseHistInfoProxy > | |
Derived & | self () |
Info * | info () |
Protected Member Functions inherited from gem5::statistics::InfoAccess | |
void | setInfo (Group *parent, Info *info) |
Set up an info class for this statistic. | |
void | setParams (const StorageParams *params) |
Save Storage class parameters if any. | |
void | setInit () |
Save Storage class parameters if any. | |
Info * | info () |
Grab the information class for this statistic. | |
const Info * | info () const |
Grab the information class for this statistic. | |
bool | newStyleStats () const |
Check if the info is new style stats. | |
Protected Attributes | |
char | storage [sizeof(Storage)] |
The storage for this stat. | |
Implementation of a sparse histogram stat.
The storage class is determined by the Storage template.
Definition at line 2410 of file statistics.hh.
typedef SparseHistInfoProxy<Derived> gem5::statistics::SparseHistBase< Derived, Stor >::Info |
Definition at line 2413 of file statistics.hh.
typedef Stor::Params gem5::statistics::SparseHistBase< Derived, Stor >::Params |
Definition at line 2415 of file statistics.hh.
typedef Stor gem5::statistics::SparseHistBase< Derived, Stor >::Storage |
Definition at line 2414 of file statistics.hh.
|
inline |
Definition at line 2450 of file statistics.hh.
|
inlineprotected |
Retrieve the storage.
Definition at line 2427 of file statistics.hh.
References gem5::statistics::SparseHistBase< Derived, Stor >::storage.
Referenced by gem5::statistics::SparseHistBase< Derived, Stor >::prepare(), gem5::statistics::SparseHistBase< Derived, Stor >::reset(), gem5::statistics::SparseHistBase< Derived, Stor >::sample(), gem5::statistics::SparseHistBase< Derived, Stor >::size(), and gem5::statistics::SparseHistBase< Derived, Stor >::zero().
|
inlineprotected |
Retrieve a const pointer to the storage.
Definition at line 2437 of file statistics.hh.
References gem5::statistics::SparseHistBase< Derived, Stor >::storage.
|
inlineprotected |
|
inline |
|
inline |
Reset stat value to default.
Definition at line 2488 of file statistics.hh.
References gem5::statistics::SparseHistBase< Derived, Stor >::data(), and gem5::statistics::DataWrap< Derived, SparseHistInfoProxy >::info().
|
inline |
Add a value to the distribtion n times.
Calls sample on the storage class.
v | The value to add. |
n | The number of times to add it, defaults to 1. |
Definition at line 2464 of file statistics.hh.
References gem5::statistics::SparseHistBase< Derived, Stor >::data(), gem5::ArmISA::n, and gem5::ArmISA::v.
Referenced by gem5::StackDistProbe::handleRequest(), and gem5::CommMonitor::MonitorStats::updateReqStats().
|
inline |
Return the number of entries in this stat.
Definition at line 2470 of file statistics.hh.
References gem5::statistics::SparseHistBase< Derived, Stor >::data().
|
inline |
Return true if no samples have been added.
Definition at line 2475 of file statistics.hh.
References gem5::statistics::SparseHistBase< Derived, Stor >::data().
|
protected |
The storage for this stat.
Definition at line 2419 of file statistics.hh.
Referenced by gem5::statistics::SparseHistBase< Derived, Stor >::data(), gem5::statistics::SparseHistBase< Derived, Stor >::data(), and gem5::statistics::SparseHistBase< Derived, Stor >::doInit().