gem5  v20.1.0.0
Classes | Public Member Functions | Private Attributes | List of all members
Stats::DistStor Class Reference

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

#include <statistics.hh>

Classes

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

Public Member Functions

 DistStor (Info *info)
 
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_track
 The minimum value to track. More...
 
Counter max_track
 The maximum value to track. More...
 
Counter bucket_size
 The number of entries in each bucket. More...
 
Counter min_val
 The smallest value sampled. More...
 
Counter max_val
 The largest value sampled. More...
 
Counter underflow
 The number of values sampled less than min. More...
 
Counter overflow
 The number of values sampled more than max. More...
 
Counter sum
 The current sum. 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 distribution stat.

Definition at line 1420 of file statistics.hh.

Constructor & Destructor Documentation

◆ DistStor()

Stats::DistStor::DistStor ( Info info)
inline

Definition at line 1465 of file statistics.hh.

References reset().

Member Function Documentation

◆ prepare()

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

◆ reset()

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

◆ sample()

void Stats::DistStor::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 1477 of file statistics.hh.

References bucket_size, cvec, MipsISA::index, max_track, max_val, min_track, min_val, overflow, samples, size(), squares, sum, underflow, and X86ISA::val.

◆ size()

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

Return the number of buckets in this distribution.

Returns
the number of buckets.

Definition at line 1505 of file statistics.hh.

References cvec.

Referenced by reset(), and sample().

◆ zero()

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

Returns true if any calls to sample have been made.

Returns
True if any values have been sampled.

Definition at line 1512 of file statistics.hh.

References samples.

Member Data Documentation

◆ bucket_size

Counter Stats::DistStor::bucket_size
private

The number of entries in each bucket.

Definition at line 1445 of file statistics.hh.

Referenced by reset(), and sample().

◆ cvec

VCounter Stats::DistStor::cvec
private

Counter for each bucket.

Definition at line 1462 of file statistics.hh.

Referenced by prepare(), reset(), sample(), and size().

◆ max_track

Counter Stats::DistStor::max_track
private

The maximum value to track.

Definition at line 1443 of file statistics.hh.

Referenced by reset(), and sample().

◆ max_val

Counter Stats::DistStor::max_val
private

The largest value sampled.

Definition at line 1450 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

◆ min_track

Counter Stats::DistStor::min_track
private

The minimum value to track.

Definition at line 1441 of file statistics.hh.

Referenced by reset(), and sample().

◆ min_val

Counter Stats::DistStor::min_val
private

The smallest value sampled.

Definition at line 1448 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

◆ overflow

Counter Stats::DistStor::overflow
private

The number of values sampled more than max.

Definition at line 1454 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

◆ samples

Counter Stats::DistStor::samples
private

The number of samples.

Definition at line 1460 of file statistics.hh.

Referenced by prepare(), reset(), sample(), and zero().

◆ squares

Counter Stats::DistStor::squares
private

The sum of squares.

Definition at line 1458 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

◆ sum

Counter Stats::DistStor::sum
private

The current sum.

Definition at line 1456 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

◆ underflow

Counter Stats::DistStor::underflow
private

The number of values sampled less than min.

Definition at line 1452 of file statistics.hh.

Referenced by prepare(), reset(), and sample().


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