gem5
|
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 1517 of file statistics.hh.
|
inline |
Definition at line 1549 of file statistics.hh.
References reset().
void Stats::HistStor::add | ( | HistStor * | hs | ) |
Definition at line 359 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 315 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 276 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 337 of file statistics.cc.
References bucket_size, cvec, ArmISA::i, max_bucket, and size().
Definition at line 1614 of file statistics.hh.
References Stats::DistData::bucket_size, bucket_size, Stats::HistStor::Params::buckets, Stats::DistData::cvec, cvec, Stats::Hist, ArmISA::i, Stats::DistData::logs, logs, Stats::DistData::max, max_bucket, Stats::DistData::max_val, Stats::DistData::min, min_bucket, Stats::DistData::min_val, safe_cast(), Stats::DistData::samples, samples, Stats::DistData::squares, squares, Stats::Info::storageParams, Stats::DistData::sum, sum, Stats::DistData::type, and Stats::DistParams::type.
|
inline |
Reset stat value to default.
Definition at line 1642 of file statistics.hh.
References bucket_size, Stats::HistStor::Params::buckets, cvec, ArmISA::i, logs, max_bucket, min_bucket, safe_cast(), 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 1566 of file statistics.hh.
References bucket_size, cvec, grow_convert(), grow_out(), grow_up(), MipsISA::index, logs, max_bucket, min_bucket, samples, size(), squares, and sum.
|
inline |
Return the number of buckets in this distribution.
Definition at line 1601 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 1608 of file statistics.hh.
References samples.
Referenced by grow_out().
|
private |
The number of entries in each bucket.
Definition at line 1535 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 1546 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 1533 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 1531 of file statistics.hh.
Referenced by add(), grow_convert(), grow_out(), prepare(), reset(), and sample().
|
private |
|
private |
|
private |