gem5
v20.1.0.0
|
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... | |
Templatized storage and interface for a histogram stat.
Definition at line 1571 of file statistics.hh.
|
inline |
Definition at line 1603 of file statistics.hh.
References reset().
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, and sum.
void Stats::HistStor::grow_convert | ( | ) |
Definition at line 353 of file statistics.cc.
References bucket_size, cvec, ArmISA::i, max_bucket, min_bucket, and size().
Referenced by sample().
void Stats::HistStor::grow_out | ( | ) |
Definition at line 314 of file statistics.cc.
References bucket_size, cvec, ArmISA::i, max_bucket, min_bucket, size(), and zero().
Referenced by sample().
void Stats::HistStor::grow_up | ( | ) |
Definition at line 375 of file statistics.cc.
References bucket_size, cvec, ArmISA::i, max_bucket, and size().
Definition at line 1668 of file statistics.hh.
References bucket_size, Stats::HistStor::Params::buckets, cvec, data, Stats::Hist, ArmISA::i, logs, max_bucket, min_bucket, samples, squares, Stats::Info::storageParams, sum, and Stats::DistParams::type.
|
inline |
Reset stat value to default.
Definition at line 1696 of file statistics.hh.
References bucket_size, Stats::HistStor::Params::buckets, cvec, ArmISA::i, logs, max_bucket, min_bucket, samples, size(), squares, Stats::Info::storageParams, and sum.
Referenced by HistStor().
|
inline |
Add a value to the distribution for the given number of times.
val | The value to add. |
number | The number of times to add the value. |
Definition at line 1620 of file statistics.hh.
References bucket_size, cvec, grow_convert(), grow_out(), grow_up(), MipsISA::index, logs, max_bucket, min_bucket, samples, size(), squares, sum, and X86ISA::val.
|
inline |
Return the number of buckets in this distribution.
Definition at line 1655 of file statistics.hh.
References cvec.
Referenced by add(), grow_convert(), grow_out(), grow_up(), reset(), and sample().
|
inline |
Returns true if any calls to sample have been made.
Definition at line 1662 of file statistics.hh.
References samples.
Referenced by grow_out().
|
private |
The number of entries in each bucket.
Definition at line 1589 of file statistics.hh.
Referenced by add(), grow_convert(), grow_out(), grow_up(), prepare(), reset(), and sample().
|
private |
Counter for each bucket.
Definition at line 1600 of file statistics.hh.
Referenced by add(), grow_convert(), grow_out(), grow_up(), prepare(), reset(), sample(), and size().
|
private |
|
private |
The maximum value to track.
Definition at line 1587 of file statistics.hh.
Referenced by grow_convert(), grow_out(), grow_up(), prepare(), reset(), and sample().
|
private |
The minimum value to track.
Definition at line 1585 of file statistics.hh.
Referenced by add(), grow_convert(), grow_out(), prepare(), reset(), and sample().
|
private |
|
private |
|
private |