gem5  v20.1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Histogram Class Reference

#include <Histogram.hh>

Public Member Functions

 Histogram (int binsize=1, uint32_t bins=50)
 
 ~Histogram ()
 
void add (int64_t value)
 
void add (Histogram &hist)
 
void doubleBinSize ()
 
void clear ()
 
void clear (uint32_t bins)
 
void clear (int binsize, uint32_t bins)
 
uint64_t size () const
 
uint32_t getBins () const
 
int getBinSize () const
 
int64_t getTotal () const
 
uint64_t getSquaredTotal () const
 
uint64_t getData (int index) const
 
int64_t getMax () const
 
void printWithMultiplier (std::ostream &out, double multiplier) const
 
void printPercent (std::ostream &out) const
 
void print (std::ostream &out) const
 

Private Member Functions

double getStandardDeviation () const
 

Private Attributes

std::vector< uint64_t > m_data
 
int64_t m_max
 
uint64_t m_count
 
int m_binsize
 
uint32_t m_largest_bin
 
int64_t m_sumSamples
 
uint64_t m_sumSquaredSamples
 

Detailed Description

Definition at line 37 of file Histogram.hh.

Constructor & Destructor Documentation

◆ Histogram()

Histogram::Histogram ( int  binsize = 1,
uint32_t  bins = 50 
)

Definition at line 38 of file Histogram.cc.

◆ ~Histogram()

Histogram::~Histogram ( )

Definition at line 44 of file Histogram.cc.

Member Function Documentation

◆ add() [1/2]

void Histogram::add ( Histogram hist)

◆ add() [2/2]

void Histogram::add ( int64_t  value)

◆ clear() [1/3]

void Histogram::clear ( )
inline

Definition at line 47 of file Histogram.hh.

References clear(), and m_data.

Referenced by clear(), AddressProfiler::clearStats(), and StoreTrace::clearSummary().

◆ clear() [2/3]

void Histogram::clear ( int  binsize,
uint32_t  bins 
)

Definition at line 49 of file Histogram.cc.

◆ clear() [3/3]

void Histogram::clear ( uint32_t  bins)

Definition at line 56 of file Histogram.cc.

References ArmISA::i.

◆ doubleBinSize()

void Histogram::doubleBinSize ( )

Definition at line 72 of file Histogram.cc.

References ArmISA::i.

Referenced by add().

◆ getBins()

uint32_t Histogram::getBins ( ) const
inline

Definition at line 52 of file Histogram.hh.

References m_data.

Referenced by add().

◆ getBinSize()

int Histogram::getBinSize ( ) const
inline

Definition at line 53 of file Histogram.hh.

References m_binsize.

Referenced by add().

◆ getData()

uint64_t Histogram::getData ( int  index) const
inline

Definition at line 56 of file Histogram.hh.

References MipsISA::index, and m_data.

Referenced by add().

◆ getMax()

int64_t Histogram::getMax ( ) const
inline

Definition at line 57 of file Histogram.hh.

References m_max.

Referenced by add().

◆ getSquaredTotal()

uint64_t Histogram::getSquaredTotal ( ) const
inline

Definition at line 55 of file Histogram.hh.

References m_sumSquaredSamples.

Referenced by add().

◆ getStandardDeviation()

double Histogram::getStandardDeviation ( ) const
private

Definition at line 176 of file Histogram.cc.

◆ getTotal()

int64_t Histogram::getTotal ( ) const
inline

Definition at line 54 of file Histogram.hh.

References m_sumSamples.

Referenced by add(), and AccessTraceForAddress::getTotal().

◆ print()

void Histogram::print ( std::ostream &  out) const

Definition at line 188 of file Histogram.cc.

Referenced by operator<<().

◆ printPercent()

void Histogram::printPercent ( std::ostream &  out) const

Definition at line 194 of file Histogram.cc.

Referenced by AddressProfiler::printStats().

◆ printWithMultiplier()

void Histogram::printWithMultiplier ( std::ostream &  out,
double  multiplier 
) const

Definition at line 204 of file Histogram.cc.

References ArmISA::i.

◆ size()

uint64_t Histogram::size ( ) const
inline

Definition at line 51 of file Histogram.hh.

References m_count.

Referenced by add(), node_less_then_eq(), and AddressProfiler::printStats().

Member Data Documentation

◆ m_binsize

int Histogram::m_binsize
private

Definition at line 67 of file Histogram.hh.

Referenced by getBinSize().

◆ m_count

uint64_t Histogram::m_count
private

Definition at line 66 of file Histogram.hh.

Referenced by size().

◆ m_data

std::vector<uint64_t> Histogram::m_data
private

Definition at line 64 of file Histogram.hh.

Referenced by clear(), getBins(), and getData().

◆ m_largest_bin

uint32_t Histogram::m_largest_bin
private

Definition at line 68 of file Histogram.hh.

◆ m_max

int64_t Histogram::m_max
private

Definition at line 65 of file Histogram.hh.

Referenced by getMax().

◆ m_sumSamples

int64_t Histogram::m_sumSamples
private

Definition at line 70 of file Histogram.hh.

Referenced by getTotal().

◆ m_sumSquaredSamples

uint64_t Histogram::m_sumSquaredSamples
private

Definition at line 71 of file Histogram.hh.

Referenced by getSquaredTotal().


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

Generated on Wed Sep 30 2020 14:02:26 for gem5 by doxygen 1.8.17