gem5 v24.0.0.0
|
Templatized storage and interface for a sparse histogram stat. More...
#include <storage.hh>
Classes | |
struct | Params |
The parameters for a sparse histogram stat. More... | |
Public Member Functions | |
SparseHistStor (const StorageParams *const storage_params) | |
void | sample (Counter val, int number) |
Add a value to the distribution for the given number of times. | |
size_type | size () const |
Return the number of buckets in this distribution. | |
bool | zero () const |
Returns true if any calls to sample have been made. | |
void | prepare (const StorageParams *const storage_params, SparseHistData &data) |
void | reset (const StorageParams *const storage_params) |
Reset stat value to default. | |
Private Attributes | |
Counter | samples |
Counter for number of samples. | |
MCounter | cmap |
Counter for each bucket. | |
Templatized storage and interface for a sparse histogram stat.
There is no actual limit on the number of buckets, and each of them has a size of 1, meaning that samples are individually recorded, and there is no need to keep track of the samples that occur in between two distant sampled values.
Definition at line 713 of file storage.hh.
|
inline |
Definition at line 728 of file storage.hh.
References gem5::statistics::reset().
|
inline |
|
inline |
|
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 739 of file storage.hh.
References cmap, samples, and gem5::X86ISA::val.
|
inline |
Return the number of buckets in this distribution.
Definition at line 749 of file storage.hh.
References cmap.
Referenced by TEST().
|
inline |
Returns true if any calls to sample have been made.
Definition at line 756 of file storage.hh.
References samples.
Referenced by TEST().
|
private |
|
private |