gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::statistics::DistBase< Derived, Stor > Class Template Reference

Implementation of a distribution stat. More...

#include <statistics.hh>

Inheritance diagram for gem5::statistics::DistBase< Derived, Stor >:
gem5::statistics::DataWrap< Derived, DistInfoProxy > gem5::statistics::InfoAccess

Public Types

typedef DistInfoProxy< Derived > Info
 
typedef Stor Storage
 
typedef Stor::Params Params
 
- Public Types inherited from gem5::statistics::DataWrap< Derived, DistInfoProxy >
typedef DistInfoProxy< Derived > Info
 

Public Member Functions

 DistBase (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.
 
void add (DistBase &d)
 Add the argument distribution to the this distribution.
 
- Public Member Functions inherited from gem5::statistics::DataWrap< Derived, DistInfoProxy >
const Infoinfo () const
 
 DataWrap ()=delete
 
 DataWrap (const DataWrap &)=delete
 
 DataWrap (Group *parent, const char *name, const units::Base *unit, const char *desc)
 
DataWrapoperator= (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

 GEM5_ALIGNED (8) char storage[sizeof(Storage)]
 The storage for this stat.
 
Storagedata ()
 Retrieve the storage.
 
const Storagedata () const
 Retrieve a const pointer to the storage.
 
void doInit ()
 
- Protected Member Functions inherited from gem5::statistics::DataWrap< Derived, DistInfoProxy >
Derived & self ()
 
Infoinfo ()
 
- 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.
 
Infoinfo ()
 Grab the information class for this statistic.
 
const Infoinfo () const
 Grab the information class for this statistic.
 
bool newStyleStats () const
 Check if the info is new style stats.
 

Detailed Description

template<class Derived, class Stor>
class gem5::statistics::DistBase< Derived, Stor >

Implementation of a distribution stat.

The type of distribution is determined by the Storage template.

See also
ScalarBase

Definition at line 1273 of file statistics.hh.

Member Typedef Documentation

◆ Info

template<class Derived , class Stor >
typedef DistInfoProxy<Derived> gem5::statistics::DistBase< Derived, Stor >::Info

Definition at line 1276 of file statistics.hh.

◆ Params

template<class Derived , class Stor >
typedef Stor::Params gem5::statistics::DistBase< Derived, Stor >::Params

Definition at line 1278 of file statistics.hh.

◆ Storage

template<class Derived , class Stor >
typedef Stor gem5::statistics::DistBase< Derived, Stor >::Storage

Definition at line 1277 of file statistics.hh.

Constructor & Destructor Documentation

◆ DistBase()

template<class Derived , class Stor >
gem5::statistics::DistBase< Derived, Stor >::DistBase ( Group * parent,
const char * name,
const units::Base * unit,
const char * desc )
inline

Definition at line 1313 of file statistics.hh.

Member Function Documentation

◆ add()

template<class Derived , class Stor >
void gem5::statistics::DistBase< Derived, Stor >::add ( DistBase< Derived, Stor > & d)
inline

Add the argument distribution to the this distribution.

Definition at line 1359 of file statistics.hh.

References gem5::ArmISA::d, and gem5::statistics::DistBase< Derived, Stor >::data().

Referenced by gem5::ruby::Profiler::collateStats().

◆ data() [1/2]

◆ data() [2/2]

template<class Derived , class Stor >
const Storage * gem5::statistics::DistBase< Derived, Stor >::data ( ) const
inlineprotected

Retrieve a const pointer to the storage.

Returns
A const pointer to the storage object for this stat.

Definition at line 1300 of file statistics.hh.

◆ doInit()

template<class Derived , class Stor >
void gem5::statistics::DistBase< Derived, Stor >::doInit ( )
inlineprotected

◆ GEM5_ALIGNED()

template<class Derived , class Stor >
gem5::statistics::DistBase< Derived, Stor >::GEM5_ALIGNED ( 8 )
protected

The storage for this stat.

◆ prepare()

◆ reset()

template<class Derived , class Stor >
void gem5::statistics::DistBase< Derived, Stor >::reset ( )
inline

◆ sample()

template<class Derived , class Stor >
template<typename U >
void gem5::statistics::DistBase< Derived, Stor >::sample ( const U & v,
int n = 1 )
inline

Add a value to the distribtion n times.

Calls sample on the storage class.

Parameters
vThe value to add.
nThe number of times to add it, defaults to 1.

Definition at line 1327 of file statistics.hh.

References gem5::statistics::DistBase< Derived, Stor >::data(), gem5::ArmISA::n, and gem5::ArmISA::v.

Referenced by gem5::FlashDevice::accessDevice(), gem5::memory::NVMInterface::chooseRead(), gem5::ExecStage::collectStatistics(), gem5::o3::Commit::commitInsts(), gem5::o3::LSQUnit::commitLoad(), gem5::SMMUTranslationProcess::completeTransaction(), gem5::PowerState::computeStats(), gem5::memory::NVMInterface::doBurstAccess(), gem5::ArmISA::TableWalker::doL2DescriptorWrapper(), gem5::ArmISA::TableWalker::doLongDescriptorWrapper(), gem5::Wavefront::exec(), gem5::VegaISA::Inst_SOPP__S_ENDPGM::execute(), gem5::UFSHostDevice::finalUTP(), gem5::CoherentXBar::forwardAtomic(), gem5::CoherentXBar::forwardTiming(), gem5::StackDistProbe::handleRequest(), gem5::SimpleCache::handleResponse(), gem5::ruby::CacheMemory::htmAbortTransaction(), gem5::ruby::HTMSequencer::htmCallback(), gem5::ruby::CacheMemory::htmCommitTransaction(), gem5::ruby::Sequencer::insertRequest(), gem5::ArmISA::TableWalker::pendingChange(), gem5::memory::DRAMInterface::prechargeBank(), gem5::FetchStage::processFetchReturn(), gem5::ComputeUnit::DataPort::processMemRespEvent(), gem5::memory::MemCtrl::processNextReqEvent(), gem5::LdsState::processPacket(), gem5::ArmISA::TableWalker::processWalk(), gem5::ArmISA::TableWalker::processWalkAArch64(), gem5::ArmISA::TableWalker::processWalkLPAE(), gem5::memory::NVMInterface::processWriteRespondEvent(), gem5::ruby::AbstractController::profileMsgDelay(), gem5::ruby::Sequencer::recordMissLatency(), gem5::SpatterGen::recvTimingResp(), gem5::Shader::sampleInstRoundTrip(), gem5::Shader::sampleLineRoundTrip(), gem5::Shader::sampleLoad(), gem5::CommMonitor::samplePeriodic(), gem5::Shader::sampleStore(), gem5::o3::InstructionQueue::scheduleReadyInsts(), gem5::SMMUTranslationProcess::smmuTranslation(), gem5::ComputeUnit::startWavefront(), gem5::o3::Fetch::tick(), gem5::GPUDynInst::updateStats(), and gem5::UFSHostDevice::write().

◆ size()

template<class Derived , class Stor >
size_type gem5::statistics::DistBase< Derived, Stor >::size ( ) const
inline

Return the number of entries in this stat.

Returns
The number of entries.

Definition at line 1333 of file statistics.hh.

References gem5::statistics::DistBase< Derived, Stor >::data().

◆ zero()

template<class Derived , class Stor >
bool gem5::statistics::DistBase< Derived, Stor >::zero ( ) const
inline

Return true if no samples have been added.

Returns
True if there haven't been any samples.

Definition at line 1338 of file statistics.hh.

References gem5::statistics::DistBase< Derived, Stor >::data().


The documentation for this class was generated from the following file:

Generated on Tue Jun 18 2024 16:24:23 for gem5 by doxygen 1.11.0