gem5  v20.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Private Attributes | List of all members
Stats::HistStor Class Reference

Templatized storage and interface for a histogram stat. More...

#include <statistics.hh>

Classes

struct  Params
 The parameters for a distribution stat. More...
 

Public Member Functions

 HistStor (Info *info)
 
void grow_up ()
 
void grow_out ()
 
void grow_convert ()
 
void add (HistStor *)
 
void sample (Counter val, int number)
 Add a value to the distribution for the given number of times. More...
 
size_type size () const
 Return the number of buckets in this distribution. More...
 
bool zero () const
 Returns true if any calls to sample have been made. More...
 
void prepare (Info *info, DistData &data)
 
void reset (Info *info)
 Reset stat value to default. More...
 

Private Attributes

Counter min_bucket
 The minimum value to track. More...
 
Counter max_bucket
 The maximum value to track. More...
 
Counter bucket_size
 The number of entries in each bucket. More...
 
Counter sum
 The current sum. More...
 
Counter logs
 The sum of logarithm of each sample, used to compute geometric mean. More...
 
Counter squares
 The sum of squares. More...
 
Counter samples
 The number of samples. More...
 
VCounter cvec
 Counter for each bucket. More...
 

Detailed Description

Templatized storage and interface for a histogram stat.

Definition at line 1543 of file statistics.hh.

Constructor & Destructor Documentation

◆ HistStor()

Stats::HistStor::HistStor ( Info info)
inline

Definition at line 1575 of file statistics.hh.

References Stats::InfoProxy< Stat, Base >::reset().

Member Function Documentation

◆ add()

void Stats::HistStor::add ( HistStor hs)

Definition at line 397 of file statistics.cc.

References bucket_size, cvec, grow_up(), ArmISA::i, logs, min_bucket, samples, size(), squares, sum, and Stats::sum().

◆ grow_convert()

void Stats::HistStor::grow_convert ( )

Definition at line 353 of file statistics.cc.

References ArmISA::i.

◆ grow_out()

void Stats::HistStor::grow_out ( )

Definition at line 314 of file statistics.cc.

References ArmISA::i, and Stats::Info::zero().

◆ grow_up()

void Stats::HistStor::grow_up ( )

Definition at line 375 of file statistics.cc.

References ArmISA::i.

Referenced by add().

◆ prepare()

void Stats::HistStor::prepare ( Info info,
DistData data 
)
inline

◆ reset()

void Stats::HistStor::reset ( Info info)
inline

Reset stat value to default.

Definition at line 1668 of file statistics.hh.

References Stats::HistStor::Params::buckets, ArmISA::i, safe_cast(), and Stats::Info::storageParams.

◆ sample()

void Stats::HistStor::sample ( Counter  val,
int  number 
)
inline

Add a value to the distribution for the given number of times.

Parameters
valThe value to add.
numberThe number of times to add the value.

Definition at line 1592 of file statistics.hh.

References MipsISA::index.

◆ size()

size_type Stats::HistStor::size ( ) const
inline

Return the number of buckets in this distribution.

Returns
the number of buckets.

Definition at line 1627 of file statistics.hh.

Referenced by add().

◆ zero()

bool Stats::HistStor::zero ( ) const
inline

Returns true if any calls to sample have been made.

Returns
True if any values have been sampled.

Definition at line 1634 of file statistics.hh.

Member Data Documentation

◆ bucket_size

Counter Stats::HistStor::bucket_size
private

The number of entries in each bucket.

Definition at line 1561 of file statistics.hh.

Referenced by add().

◆ cvec

VCounter Stats::HistStor::cvec
private

Counter for each bucket.

Definition at line 1572 of file statistics.hh.

Referenced by add().

◆ logs

Counter Stats::HistStor::logs
private

The sum of logarithm of each sample, used to compute geometric mean.

Definition at line 1566 of file statistics.hh.

Referenced by add().

◆ max_bucket

Counter Stats::HistStor::max_bucket
private

The maximum value to track.

Definition at line 1559 of file statistics.hh.

◆ min_bucket

Counter Stats::HistStor::min_bucket
private

The minimum value to track.

Definition at line 1557 of file statistics.hh.

Referenced by add().

◆ samples

Counter Stats::HistStor::samples
private

The number of samples.

Definition at line 1570 of file statistics.hh.

Referenced by add().

◆ squares

Counter Stats::HistStor::squares
private

The sum of squares.

Definition at line 1568 of file statistics.hh.

Referenced by add().

◆ sum

Counter Stats::HistStor::sum
private

The current sum.

Definition at line 1564 of file statistics.hh.

Referenced by add().


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

Generated on Thu May 28 2020 16:22:27 for gem5 by doxygen 1.8.13