gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ( int  binsize = 1,
uint32_t  bins = 50 
)

Definition at line 38 of file Histogram.cc.

References ArmISA::clear().

Histogram::~Histogram ( )

Definition at line 44 of file Histogram.cc.

Member Function Documentation

void Histogram::add ( int64_t  value)
void Histogram::add ( Histogram hist)
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().

void Histogram::clear ( uint32_t  bins)

Definition at line 56 of file Histogram.cc.

References ArmISA::i.

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

Definition at line 49 of file Histogram.cc.

References ArmISA::clear().

void Histogram::doubleBinSize ( )

Definition at line 72 of file Histogram.cc.

References ArmISA::i.

Referenced by add().

uint32_t Histogram::getBins ( ) const
inline

Definition at line 52 of file Histogram.hh.

References m_data.

Referenced by add().

int Histogram::getBinSize ( ) const
inline

Definition at line 53 of file Histogram.hh.

References m_binsize.

Referenced by add().

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().

int64_t Histogram::getMax ( ) const
inline

Definition at line 57 of file Histogram.hh.

References m_max.

Referenced by add().

uint64_t Histogram::getSquaredTotal ( ) const
inline

Definition at line 55 of file Histogram.hh.

References m_sumSquaredSamples.

Referenced by add().

double Histogram::getStandardDeviation ( ) const
private

Definition at line 176 of file Histogram.cc.

int64_t Histogram::getTotal ( ) const
inline

Definition at line 54 of file Histogram.hh.

References m_sumSamples.

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

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

Definition at line 188 of file Histogram.cc.

Referenced by operator<<().

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

Definition at line 194 of file Histogram.cc.

Referenced by AddressProfiler::printStats().

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

Definition at line 204 of file Histogram.cc.

References ArmISA::i.

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

int Histogram::m_binsize
private

Definition at line 67 of file Histogram.hh.

Referenced by getBinSize().

uint64_t Histogram::m_count
private

Definition at line 66 of file Histogram.hh.

Referenced by size().

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

Definition at line 64 of file Histogram.hh.

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

uint32_t Histogram::m_largest_bin
private

Definition at line 68 of file Histogram.hh.

int64_t Histogram::m_max
private

Definition at line 65 of file Histogram.hh.

Referenced by getMax().

int64_t Histogram::m_sumSamples
private

Definition at line 70 of file Histogram.hh.

Referenced by getTotal().

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 Fri Jun 9 2017 13:04:12 for gem5 by doxygen 1.8.6