gem5  v20.1.0.0
Public Types | Public Member Functions | Protected Member Functions | List of all members
Stats::DistBase< Derived, Stor > Class Template Reference

Implementation of a distribution stat. More...

#include <statistics.hh>

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

Public Types

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

Public Member Functions

 DistBase (Group *parent, const char *name, const char *desc)
 
template<typename U >
void sample (const U &v, int n=1)
 Add a value to the distribtion n times. More...
 
size_type size () const
 Return the number of entries in this stat. More...
 
bool zero () const
 Return true if no samples have been added. More...
 
void prepare ()
 
void reset ()
 Reset stat value to default. More...
 
void add (DistBase &d)
 Add the argument distribution to the this distribution. More...
 
- Public Member Functions inherited from Stats::DataWrap< Derived, DistInfoProxy >
const Infoinfo () const
 
 DataWrap ()=delete
 
 DataWrap (const DataWrap &)=delete
 
 DataWrap (Group *parent, const char *name, 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. More...
 
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. More...
 
const std::string & setSeparator () const
 
Derived & desc (const std::string &_desc)
 Set the description and marks this stat to print at the end of simulation. More...
 
Derived & precision (int _precision)
 Set the precision and marks this stat to print at the end of simulation. More...
 
Derived & flags (Flags _flags)
 Set the flags and marks this stat to print at the end of simulation. More...
 
Derived & prereq (const Stat &prereq)
 Set the prerequisite stat and marks this stat to print at the end of simulation. More...
 
- Public Member Functions inherited from Stats::InfoAccess
 InfoAccess ()
 
void reset ()
 Reset the stat to the default state. More...
 
bool zero () const
 
bool check () const
 Check that this stat has been set up properly and is ready for use. More...
 

Protected Member Functions

char storage[sizeof(Storage)] __attribute__ ((aligned(8)))
 The storage for this stat. More...
 
Storagedata ()
 Retrieve the storage. More...
 
const Storagedata () const
 Retrieve a const pointer to the storage. More...
 
void doInit ()
 
- Protected Member Functions inherited from Stats::DataWrap< Derived, DistInfoProxy >
Derived & self ()
 
Infoinfo ()
 
- Protected Member Functions inherited from Stats::InfoAccess
void setInfo (Group *parent, Info *info)
 Set up an info class for this statistic. More...
 
void setParams (const StorageParams *params)
 Save Storage class parameters if any. More...
 
void setInit ()
 Save Storage class parameters if any. More...
 
Infoinfo ()
 Grab the information class for this statistic. More...
 
const Infoinfo () const
 Grab the information class for this statistic. More...
 

Detailed Description

template<class Derived, class Stor>
class Stats::DistBase< Derived, Stor >

Implementation of a distribution stat.

The type of distribution is determined by the Storage template.

See also
ScalarBase

Definition at line 1872 of file statistics.hh.

Member Typedef Documentation

◆ Info

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

Definition at line 1875 of file statistics.hh.

◆ Params

template<class Derived , class Stor >
typedef Stor::Params Stats::DistBase< Derived, Stor >::Params

Definition at line 1877 of file statistics.hh.

◆ Storage

template<class Derived , class Stor >
typedef Stor Stats::DistBase< Derived, Stor >::Storage

Definition at line 1876 of file statistics.hh.

Constructor & Destructor Documentation

◆ DistBase()

template<class Derived , class Stor >
Stats::DistBase< Derived, Stor >::DistBase ( Group parent,
const char *  name,
const char *  desc 
)
inline

Definition at line 1912 of file statistics.hh.

Member Function Documentation

◆ __attribute__()

template<class Derived , class Stor >
char storage [sizeof(Storage)] Stats::DistBase< Derived, Stor >::__attribute__ ( (aligned(8))  )
protected

The storage for this stat.

◆ add()

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

Add the argument distribution to the this distribution.

Definition at line 1956 of file statistics.hh.

Referenced by Profiler::collateStats().

◆ data() [1/2]

template<class Derived , class Stor >
Storage* Stats::DistBase< Derived, Stor >::data ( )
inlineprotected

◆ data() [2/2]

template<class Derived , class Stor >
const Storage* Stats::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 1899 of file statistics.hh.

◆ doInit()

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

Definition at line 1905 of file statistics.hh.

◆ prepare()

template<class Derived , class Stor >
void Stats::DistBase< Derived, Stor >::prepare ( )
inline

Definition at line 1938 of file statistics.hh.

◆ reset()

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

Reset stat value to default.

Definition at line 1948 of file statistics.hh.

Referenced by Sequencer::resetStats(), AbstractController::resetStats(), and GPUCoalescer::resetStats().

◆ sample()

template<class Derived , class Stor >
template<typename U >
void Stats::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 1924 of file statistics.hh.

Referenced by FlashDevice::accessDevice(), NVMInterface::chooseRead(), ExecStage::collectStatistics(), SMMUTranslationProcess::completeTransaction(), PowerState::computeStats(), NVMInterface::doBurstAccess(), ArmISA::TableWalker::doL1DescriptorWrapper(), ArmISA::TableWalker::doL2DescriptorWrapper(), ArmISA::TableWalker::doLongDescriptorWrapper(), Wavefront::exec(), Gcn3ISA::Inst_SOPP__S_ENDPGM::execute(), UFSHostDevice::finalUTP(), CoherentXBar::forwardAtomic(), CoherentXBar::forwardTiming(), StackDistProbe::handleRequest(), SimpleCache::handleResponse(), CacheMemory::htmAbortTransaction(), HTMSequencer::htmCallback(), CacheMemory::htmCommitTransaction(), Sequencer::insertRequest(), ArmISA::TableWalker::pendingChange(), DRAMInterface::prechargeBank(), FetchStage::processFetchReturn(), ComputeUnit::DataPort::processMemRespEvent(), MemCtrl::processNextReqEvent(), LdsState::processPacket(), ArmISA::TableWalker::processWalk(), ArmISA::TableWalker::processWalkAArch64(), ArmISA::TableWalker::processWalkLPAE(), ArmISA::TableWalker::processWalkWrapper(), NVMInterface::processWriteRespondEvent(), AbstractController::profileMsgDelay(), Sequencer::recordMissLatency(), Shader::sampleInstRoundTrip(), Shader::sampleLineRoundTrip(), Shader::sampleLoad(), Shader::sampleStore(), SMMUTranslationProcess::smmuTranslation(), ComputeUnit::startWavefront(), DefaultFetch< Impl >::tick(), CommMonitor::MonitorStats::updateReqStats(), CommMonitor::MonitorStats::updateRespStats(), GPUDynInst::updateStats(), and UFSHostDevice::write().

◆ size()

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

Return the number of entries in this stat.

Returns
The number of entries.

Definition at line 1930 of file statistics.hh.

◆ zero()

template<class Derived , class Stor >
bool Stats::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 1935 of file statistics.hh.


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

Generated on Wed Sep 30 2020 14:03:12 for gem5 by doxygen 1.8.17