gem5  v21.1.0.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gem5::ruby::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 43 of file Histogram.hh.

Constructor & Destructor Documentation

◆ Histogram()

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

Definition at line 43 of file Histogram.cc.

References clear(), and m_binsize.

◆ ~Histogram()

gem5::ruby::Histogram::~Histogram ( )

Definition at line 49 of file Histogram.cc.

Member Function Documentation

◆ add() [1/2]

void gem5::ruby::Histogram::add ( Histogram hist)

◆ add() [2/2]

void gem5::ruby::Histogram::add ( int64_t  value)

◆ clear() [1/3]

void gem5::ruby::Histogram::clear ( )
inline

◆ clear() [2/3]

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

Definition at line 54 of file Histogram.cc.

References clear(), and m_binsize.

◆ clear() [3/3]

void gem5::ruby::Histogram::clear ( uint32_t  bins)

◆ doubleBinSize()

void gem5::ruby::Histogram::doubleBinSize ( )

Definition at line 77 of file Histogram.cc.

References gem5::ArmISA::i, m_binsize, and m_data.

Referenced by add().

◆ getBins()

uint32_t gem5::ruby::Histogram::getBins ( ) const
inline

Definition at line 58 of file Histogram.hh.

References m_data.

Referenced by add().

◆ getBinSize()

int gem5::ruby::Histogram::getBinSize ( ) const
inline

Definition at line 59 of file Histogram.hh.

References m_binsize.

Referenced by add().

◆ getData()

uint64_t gem5::ruby::Histogram::getData ( int  index) const
inline

Definition at line 62 of file Histogram.hh.

References gem5::MipsISA::index, and m_data.

Referenced by add().

◆ getMax()

int64_t gem5::ruby::Histogram::getMax ( ) const
inline

Definition at line 63 of file Histogram.hh.

References m_max.

Referenced by add().

◆ getSquaredTotal()

uint64_t gem5::ruby::Histogram::getSquaredTotal ( ) const
inline

Definition at line 61 of file Histogram.hh.

References m_sumSquaredSamples.

Referenced by add().

◆ getStandardDeviation()

double gem5::ruby::Histogram::getStandardDeviation ( ) const
private

Definition at line 181 of file Histogram.cc.

References m_count, m_sumSamples, and m_sumSquaredSamples.

Referenced by printWithMultiplier().

◆ getTotal()

int64_t gem5::ruby::Histogram::getTotal ( ) const
inline

Definition at line 60 of file Histogram.hh.

References m_sumSamples.

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

◆ print()

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

Definition at line 193 of file Histogram.cc.

References printWithMultiplier().

Referenced by gem5::ruby::operator<<().

◆ printPercent()

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

Definition at line 199 of file Histogram.cc.

References m_count, and printWithMultiplier().

Referenced by gem5::ruby::AddressProfiler::printStats().

◆ printWithMultiplier()

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

Definition at line 209 of file Histogram.cc.

References getStandardDeviation(), gem5::ArmISA::i, m_binsize, m_count, m_data, m_largest_bin, m_max, and m_sumSamples.

Referenced by print(), and printPercent().

◆ size()

uint64_t gem5::ruby::Histogram::size ( ) const
inline

Definition at line 57 of file Histogram.hh.

References m_count.

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

Member Data Documentation

◆ m_binsize

int gem5::ruby::Histogram::m_binsize
private

Definition at line 73 of file Histogram.hh.

Referenced by add(), clear(), doubleBinSize(), getBinSize(), Histogram(), and printWithMultiplier().

◆ m_count

uint64_t gem5::ruby::Histogram::m_count
private

Definition at line 72 of file Histogram.hh.

Referenced by add(), clear(), getStandardDeviation(), printPercent(), printWithMultiplier(), and size().

◆ m_data

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

Definition at line 70 of file Histogram.hh.

Referenced by add(), clear(), doubleBinSize(), getBins(), getData(), and printWithMultiplier().

◆ m_largest_bin

uint32_t gem5::ruby::Histogram::m_largest_bin
private

Definition at line 74 of file Histogram.hh.

Referenced by add(), clear(), and printWithMultiplier().

◆ m_max

int64_t gem5::ruby::Histogram::m_max
private

Definition at line 71 of file Histogram.hh.

Referenced by add(), clear(), getMax(), and printWithMultiplier().

◆ m_sumSamples

int64_t gem5::ruby::Histogram::m_sumSamples
private

Definition at line 76 of file Histogram.hh.

Referenced by add(), clear(), getStandardDeviation(), getTotal(), and printWithMultiplier().

◆ m_sumSquaredSamples

uint64_t gem5::ruby::Histogram::m_sumSquaredSamples
private

Definition at line 77 of file Histogram.hh.

Referenced by add(), clear(), getSquaredTotal(), and getStandardDeviation().


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

Generated on Tue Sep 21 2021 12:32:05 for gem5 by doxygen 1.8.17