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

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

#include <statistics.hh>

Classes

struct  Params
 The parameters for a sparse histogram stat. More...
 

Public Member Functions

 SparseHistStor (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, SparseHistData &data)
 
void reset (Info *info)
 Reset stat value to default. More...
 

Private Attributes

Counter samples
 Counter for number of samples. More...
 
MCounter cmap
 Counter for each bucket. More...
 

Detailed Description

Templatized storage and interface for a sparse histogram stat.

Definition at line 2907 of file statistics.hh.

Constructor & Destructor Documentation

◆ SparseHistStor()

Stats::SparseHistStor::SparseHistStor ( Info info)
inline

Definition at line 2923 of file statistics.hh.

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

Member Function Documentation

◆ prepare()

void Stats::SparseHistStor::prepare ( Info info,
SparseHistData data 
)
inline

Definition at line 2957 of file statistics.hh.

References Stats::SparseHistData::cmap, and Stats::SparseHistData::samples.

◆ reset()

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

Reset stat value to default.

Definition at line 2972 of file statistics.hh.

◆ sample()

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

References X86ISA::val.

◆ size()

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

Return the number of buckets in this distribution.

Returns
the number of buckets.

Definition at line 2944 of file statistics.hh.

◆ zero()

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

Returns true if any calls to sample have been made.

Returns
True if any values have been sampled.

Definition at line 2951 of file statistics.hh.

Member Data Documentation

◆ cmap

MCounter Stats::SparseHistStor::cmap
private

Counter for each bucket.

Definition at line 2920 of file statistics.hh.

◆ samples

Counter Stats::SparseHistStor::samples
private

Counter for number of samples.

Definition at line 2918 of file statistics.hh.


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

Generated on Mon Jun 8 2020 15:46:04 for gem5 by doxygen 1.8.13