gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
Stats Namespace Reference

Classes

class  InfoProxy
 
class  ScalarInfoProxy
 
class  VectorInfoProxy
 
class  DistInfoProxy
 
class  VectorDistInfoProxy
 
class  Vector2dInfoProxy
 
struct  StorageParams
 
class  InfoAccess
 
class  DataWrap
 
class  DataWrapVec
 
class  DataWrapVec2d
 
class  StatStor
 Templatized storage and interface for a simple scalar stat. More...
 
class  AvgStor
 Templatized storage and interface to a per-tick average stat. More...
 
class  ScalarBase
 Implementation of a scalar stat. More...
 
class  ProxyInfo
 
class  ValueProxy
 
class  FunctorProxy
 
class  MethodProxy
 A proxy similar to the FunctorProxy, but allows calling a method of a bound object, instead of a global free-standing function. More...
 
class  ValueBase
 
class  ScalarProxy
 A proxy class to access the stat at a given index in a VectorBase stat. More...
 
class  VectorBase
 Implementation of a vector of stats. More...
 
class  VectorProxy
 
class  Vector2dBase
 
struct  DistParams
 The parameters for a distribution stat. More...
 
class  DistStor
 Templatized storage and interface for a distribution stat. More...
 
class  HistStor
 Templatized storage and interface for a histogram stat. More...
 
class  SampleStor
 Templatized storage and interface for a distribution that calculates mean and variance. More...
 
class  AvgSampleStor
 Templatized storage for distribution that calculates per tick mean and variance. More...
 
class  DistBase
 Implementation of a distribution stat. More...
 
class  DistProxy
 
class  VectorDistBase
 
class  Node
 Base class for formula statistic node. More...
 
class  ScalarStatNode
 
class  ScalarProxyNode
 
class  VectorStatNode
 
class  ConstNode
 
class  ConstVectorNode
 
struct  OpString
 
struct  OpString< std::plus< Result > >
 
struct  OpString< std::minus< Result > >
 
struct  OpString< std::multiplies< Result > >
 
struct  OpString< std::divides< Result > >
 
struct  OpString< std::modulus< Result > >
 
struct  OpString< std::negate< Result > >
 
class  UnaryNode
 
class  BinaryNode
 
class  SumNode
 
class  Scalar
 This is a simple scalar statistic, like a counter. More...
 
class  Average
 A stat that calculates the per tick average of a value. More...
 
class  Value
 
class  Vector
 A vector of scalar stats. More...
 
class  AverageVector
 A vector of Average stats. More...
 
class  Vector2d
 A 2-Dimensional vecto of scalar stats. More...
 
class  Distribution
 A simple distribution stat. More...
 
class  Histogram
 A simple histogram stat. More...
 
class  StandardDeviation
 Calculates the mean and variance of all the samples. More...
 
class  AverageDeviation
 Calculates the per tick mean and variance of the samples. More...
 
class  VectorDistribution
 A vector of distributions. More...
 
class  VectorStandardDeviation
 This is a vector of StandardDeviation stats. More...
 
class  VectorAverageDeviation
 This is a vector of AverageDeviation stats. More...
 
class  FormulaInfoProxy
 
class  SparseHistInfoProxy
 
class  SparseHistBase
 Implementation of a sparse histogram stat. More...
 
class  SparseHistStor
 Templatized storage and interface for a sparse histogram stat. More...
 
class  SparseHistogram
 
class  Formula
 A formula for statistics that is calculated when printed. More...
 
class  FormulaNode
 
class  Temp
 Helper class to construct formula node trees. More...
 
class  Info
 
class  ScalarInfo
 
class  VectorInfo
 
struct  DistData
 
class  DistInfo
 
class  VectorDistInfo
 
class  Vector2dInfo
 
class  FormulaInfo
 
struct  SparseHistData
 Data structure of sparse histogram. More...
 
class  SparseHistInfo
 
struct  Output
 
struct  ScalarPrint
 
struct  VectorPrint
 
struct  DistPrint
 
struct  SparseHistPrint
 
class  Text
 
struct  SimTicksReset
 
struct  Global
 
class  StatEvent
 Event to dump and/or reset the statistics. More...
 

Typedefs

typedef std::shared_ptr< NodeNodePtr
 Shared pointer to a function Node. More...
 
typedef void(* Handler )()
 Register reset and dump handlers. More...
 
typedef std::map< const void
*, Info * > 
MapType
 
typedef std::map< std::string,
Info * > 
NameMapType
 
typedef uint16_t FlagsType
 
typedef ::Flags< FlagsTypeFlags
 
typedef double Counter
 All counters are of 64-bit values. More...
 
typedef std::vector< CounterVCounter
 vector of counters. More...
 
typedef std::map< Counter, int > MCounter
 map of counters More...
 
typedef std::numeric_limits
< Counter
CounterLimits
 
typedef double Result
 All results are doubles. More...
 
typedef std::vector< ResultVResult
 vector of results. More...
 
typedef unsigned int size_type
 
typedef unsigned int off_type
 

Enumerations

enum  DistType { Deviation, Dist, Hist }
 

Functions

list< Info * > & statsList ()
 
MapTypestatsMap ()
 
NameMapTypenameMap ()
 
bool validateStatName (const string &name)
 
void registerHandlers (Handler reset_handler, Handler dump_handler)
 
void processResetQueue ()
 Process all the callbacks in the reset callbacks queue. More...
 
void processDumpQueue ()
 Process all the callbacks in the dump callbacks queue. More...
 
void registerResetCallback (Callback *cb)
 Register a callback that should be called whenever statistics are reset. More...
 
bool enabled ()
 
void enable ()
 
void dump ()
 Dump all statistics data to the registered outputs. More...
 
void reset ()
 
void registerDumpCallback (Callback *cb)
 Register a callback that should be called whenever statistics are about to be dumped. More...
 
Temp operator+ (Temp l, Temp r)
 
Temp operator- (Temp l, Temp r)
 
Temp operator* (Temp l, Temp r)
 
Temp operator/ (Temp l, Temp r)
 
Temp operator- (Temp l)
 
template<typename T >
Temp constant (T val)
 
template<typename T >
Temp constantVector (T val)
 
Temp sum (Temp val)
 
bool validateStatName (const std::string &name)
 
string ValueToString (Result value, int precision)
 
OutputinitText (const string &filename, bool desc)
 
OutputinitText (const std::string &filename, bool desc)
 
void pythonDump ()
 
void pythonReset ()
 
double statElapsedTime ()
 
Tick statElapsedTicks ()
 
Tick statFinalTick ()
 
void initSimStats ()
 
void schedStatEvent (bool dump, bool reset, Tick when=curTick(), Tick repeat=0)
 Schedule statistics dumping. More...
 
void periodicStatDump (Tick period=0)
 Schedule periodic statistics dumping. More...
 
void updateEvents ()
 Update the events after resuming from a checkpoint. More...
 
void registerPythonStatsHandlers ()
 Register py_... More...
 

Variables

int debug_break_id = -1
 
Handler resetHandler = NULL
 
Handler dumpHandler = NULL
 
CallbackQueue dumpQueue
 
CallbackQueue resetQueue
 
bool _enabled = false
 
const FlagsType none = 0x0000
 Nothing extra to print. More...
 
const FlagsType init = 0x0001
 This Stat is Initialized. More...
 
const FlagsType display = 0x0002
 Print this stat. More...
 
const FlagsType total = 0x0010
 Print the total. More...
 
const FlagsType pdf = 0x0020
 Print the percent of the total that this entry represents. More...
 
const FlagsType cdf = 0x0040
 Print the cumulative percentage of total upto this entry. More...
 
const FlagsType dist = 0x0080
 Print the distribution. More...
 
const FlagsType nozero = 0x0100
 Don't print if this is zero. More...
 
const FlagsType nonan = 0x0200
 Don't print if this is NAN. More...
 
const FlagsType oneline = 0x0400
 Print all values on a single line. More...
 
const FlagsType __reserved = init | display
 Mask of flags that can't be set directly. More...
 
Time statTime (true)
 
Tick startTick
 
GlobalEventdumpEvent
 
SimTicksReset simTicksReset
 

Typedef Documentation

typedef double Stats::Counter

All counters are of 64-bit values.

Definition at line 43 of file types.hh.

typedef std::numeric_limits<Counter> Stats::CounterLimits

Definition at line 49 of file types.hh.

Definition at line 40 of file info.hh.

typedef uint16_t Stats::FlagsType

Definition at line 39 of file info.hh.

typedef void(* Stats::Handler)()

Register reset and dump handlers.

These are the functions which will actually perform the whole statistics reset/dump actions including processing the reset/dump callbacks

Definition at line 3240 of file statistics.hh.

typedef std::map<const void *, Info *> Stats::MapType

Definition at line 3268 of file statistics.hh.

typedef std::map<Counter, int> Stats::MCounter

map of counters

Definition at line 47 of file types.hh.

typedef std::map<std::string, Info *> Stats::NameMapType

Definition at line 3271 of file statistics.hh.

typedef std::shared_ptr<Node> Stats::NodePtr

Shared pointer to a function Node.

Definition at line 2096 of file statistics.hh.

typedef unsigned int Stats::off_type

Definition at line 57 of file types.hh.

typedef double Stats::Result

All results are doubles.

Definition at line 52 of file types.hh.

typedef unsigned int Stats::size_type

Definition at line 56 of file types.hh.

vector of counters.

Definition at line 45 of file types.hh.

vector of results.

Definition at line 54 of file types.hh.

Enumeration Type Documentation

Enumerator
Deviation 
Dist 
Hist 

Definition at line 172 of file info.hh.

Function Documentation

template<typename T >
Temp Stats::constant ( val)
inline
template<typename T >
Temp Stats::constantVector ( val)
inline

Definition at line 3218 of file statistics.hh.

void Stats::dump ( )
void Stats::enable ( )

Definition at line 508 of file statistics.cc.

References _enabled, and fatal.

Referenced by pybind_init_stats().

bool Stats::enabled ( )
void Stats::initSimStats ( )

Definition at line 208 of file stat_control.cc.

References X86ISA::global.

Referenced by pybind_init_stats().

Output* Stats::initText ( const std::string &  filename,
bool  desc 
)
Output* Stats::initText ( const string &  filename,
bool  desc 
)
NameMapType & Stats::nameMap ( )

Definition at line 118 of file statistics.cc.

Referenced by Stats::Info::setName().

Temp Stats::operator* ( Temp  l,
Temp  r 
)
inline

Definition at line 3192 of file statistics.hh.

Temp Stats::operator+ ( Temp  l,
Temp  r 
)
inline

Definition at line 3180 of file statistics.hh.

Temp Stats::operator- ( Temp  l,
Temp  r 
)
inline

Definition at line 3186 of file statistics.hh.

Temp Stats::operator- ( Temp  l)
inline

Definition at line 3204 of file statistics.hh.

Temp Stats::operator/ ( Temp  l,
Temp  r 
)
inline

Definition at line 3198 of file statistics.hh.

void Stats::periodicStatDump ( Tick  period = 0)

Schedule periodic statistics dumping.

This allows you to dump and reset the built-in statistics on a regular basis, thereby allowing the extraction of temporal trends in the data.

Parameters
periodThe period at which the dumping should occur.

Definition at line 258 of file stat_control.cc.

References curTick(), BaseGlobalEvent::deschedule(), dumpEvent, schedStatEvent(), and BaseGlobalEvent::scheduled().

Referenced by pybind_init_stats().

void Stats::processDumpQueue ( )

Process all the callbacks in the dump callbacks queue.

Definition at line 488 of file statistics.cc.

References dumpQueue, and CallbackQueue::process().

Referenced by pybind_init_stats().

void Stats::processResetQueue ( )

Process all the callbacks in the reset callbacks queue.

Definition at line 482 of file statistics.cc.

References CallbackQueue::process(), and resetQueue.

Referenced by pybind_init_stats().

void Stats::pythonDump ( )

Definition at line 57 of file stats.cc.

References ArmISA::m.

Referenced by registerPythonStatsHandlers().

void Stats::pythonReset ( )

Definition at line 64 of file stats.cc.

References ArmISA::m.

Referenced by registerPythonStatsHandlers().

void Stats::registerDumpCallback ( Callback cb)

Register a callback that should be called whenever statistics are about to be dumped.

Definition at line 535 of file statistics.cc.

References CallbackQueue::add(), and dumpQueue.

Referenced by AbstractController::AbstractController(), Network::Network(), BaseTags::regStats(), ClockedObject::regStats(), DRAMCtrl::Rank::regStats(), and RubySystem::RubySystem().

void Stats::registerHandlers ( Handler  reset_handler,
Handler  dump_handler 
)

Definition at line 472 of file statistics.cc.

References dumpHandler, and resetHandler.

Referenced by registerPythonStatsHandlers().

void Stats::registerPythonStatsHandlers ( )

Register py_...

functions as the statistics handlers

Definition at line 50 of file stat_register.cc.

References pythonDump(), pythonReset(), and registerHandlers().

Referenced by pybind_init_stats().

void Stats::registerResetCallback ( Callback cb)

Register a callback that should be called whenever statistics are reset.

Definition at line 494 of file statistics.cc.

References CallbackQueue::add(), and resetQueue.

Referenced by FunctionProfile::FunctionProfile(), Stats::Global::Global(), and MemFootprintProbe::regStats().

void Stats::reset ( )

Definition at line 526 of file statistics.cc.

References fatal, and resetHandler.

Referenced by Stats::StatEvent::process(), and DVFSHandler::UpdateEvent::updatePerfLevel().

void Stats::schedStatEvent ( bool  dump,
bool  reset,
Tick  when = curTick(),
Tick  repeat = 0 
)

Schedule statistics dumping.

This allows you to dump and/or reset the built-in statistics. This can either be done once, or it can be done on a regular basis.

Parameters
dumpSet true to dump the statistics.
resetSet true to reset the statistics.
whenWhen the dump and/or reset should occur.
repeatHow often the event should repeat. Set 0 to disable repeating.

Definition at line 248 of file stat_control.cc.

References dumpEvent, and simQuantum.

Referenced by doSimLoop(), PseudoInst::dumpresetstats(), PseudoInst::dumpstats(), periodicStatDump(), DumpStatsPCEvent::process(), Stats::StatEvent::process(), pybind_init_stats(), and PseudoInst::resetstats().

Tick Stats::statElapsedTicks ( )

Definition at line 96 of file stat_control.cc.

References curTick(), and startTick.

Referenced by Stats::Global::Global().

double Stats::statElapsedTime ( )

Definition at line 86 of file stat_control.cc.

References Time::setTimer(), and statTime.

Referenced by Stats::Global::Global().

Tick Stats::statFinalTick ( )

Definition at line 102 of file stat_control.cc.

References curTick().

Referenced by Stats::Global::Global().

std::list< Info * > & Stats::statsList ( )
MapType & Stats::statsMap ( )

Definition at line 63 of file statistics.cc.

Referenced by Stats::InfoAccess::info(), and Stats::InfoAccess::setInfo().

Temp Stats::sum ( Temp  val)
inline
void Stats::updateEvents ( )

Update the events after resuming from a checkpoint.

When resuming from a checkpoint, curTick will be updated, and any already scheduled events can end up scheduled in the past. This function checks if the dumpEvent is scheduled in the past, and reschedules it appropriately.

Definition at line 288 of file stat_control.cc.

References curTick(), dumpEvent, BaseGlobalEvent::reschedule(), BaseGlobalEvent::scheduled(), and BaseGlobalEvent::when().

Referenced by pybind_init_stats().

bool Stats::validateStatName ( const string &  name)

Definition at line 141 of file statistics.cc.

References ArmISA::c, and tokenize().

Referenced by Stats::Info::setName().

bool Stats::validateStatName ( const std::string &  name)
std::string Stats::ValueToString ( Result  value,
int  precision 
)

Definition at line 169 of file text.cc.

References X86ISA::val.

Referenced by Stats::ScalarPrint::operator()().

Variable Documentation

const FlagsType Stats::__reserved = init | display

Mask of flags that can't be set directly.

Definition at line 64 of file info.hh.

bool Stats::_enabled = false

Definition at line 499 of file statistics.cc.

Referenced by enable(), and enabled().

const FlagsType Stats::cdf = 0x0040

Print the cumulative percentage of total upto this entry.

Definition at line 53 of file info.hh.

Referenced by Stats::VectorPrint::operator()().

int Stats::debug_break_id = -1

Definition at line 126 of file statistics.cc.

Referenced by Stats::Info::Info().

const FlagsType Stats::display = 0x0002
const FlagsType Stats::dist = 0x0080
GlobalEvent* Stats::dumpEvent

Definition at line 74 of file stat_control.cc.

Referenced by periodicStatDump(), schedStatEvent(), and updateEvents().

Handler Stats::dumpHandler = NULL

Definition at line 469 of file statistics.cc.

Referenced by dump(), and registerHandlers().

CallbackQueue Stats::dumpQueue

Definition at line 478 of file statistics.cc.

Referenced by processDumpQueue(), and registerDumpCallback().

const FlagsType Stats::init = 0x0001
const FlagsType Stats::nonan = 0x0200
const FlagsType Stats::none = 0x0000
const FlagsType Stats::nozero = 0x0100
const FlagsType Stats::oneline = 0x0400

Print all values on a single line.

Useful only for histograms.

Definition at line 61 of file info.hh.

Referenced by Stats::VectorPrint::operator()(), Stats::DistPrint::operator()(), Profiler::regStats(), and GarnetNetwork::regStats().

const FlagsType Stats::pdf = 0x0020
Handler Stats::resetHandler = NULL

Definition at line 468 of file statistics.cc.

Referenced by registerHandlers(), and reset().

CallbackQueue Stats::resetQueue

Definition at line 479 of file statistics.cc.

Referenced by processResetQueue(), and registerResetCallback().

SimTicksReset Stats::simTicksReset

Definition at line 107 of file stat_control.cc.

Referenced by Stats::Global::Global().

Tick Stats::startTick

Definition at line 72 of file stat_control.cc.

Referenced by Stats::SimTicksReset::process(), and statElapsedTicks().

Time Stats::statTime(true)

Referenced by statElapsedTime().

const FlagsType Stats::total = 0x0010

Generated on Fri Jun 9 2017 13:04:37 for gem5 by doxygen 1.8.6